From: Wolfgang M. M. <wol...@us...> - 2004-04-23 13:08:00
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2156/src/org/exist/xmlrpc Modified Files: RpcConnection.java Log Message: A large number of XUpdate bugs has been fixed. Index: RpcConnection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmlrpc/RpcConnection.java,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** RpcConnection.java 30 Mar 2004 16:56:32 -0000 1.50 --- RpcConnection.java 23 Apr 2004 13:07:50 -0000 1.51 *************** *** 8,11 **** --- 8,13 ---- import java.io.StringReader; import java.io.StringWriter; + import java.net.MalformedURLException; + import java.net.URI; import java.util.Date; import java.util.Enumeration; *************** *** 869,873 **** "Old document exists and overwrite is not allowed"); } ! String uri = file.toURI().toASCIIString(); collection.addDocument(broker, docName, new InputSource(uri)); } finally { --- 871,880 ---- "Old document exists and overwrite is not allowed"); } ! String uri; ! try { ! uri = new URI(file.toURL().toString()).toASCIIString(); ! } catch (Exception e) { ! uri = file.getAbsolutePath(); ! } collection.addDocument(broker, docName, new InputSource(uri)); } finally { *************** *** 922,926 **** if (!file.canWrite()) throw new EXistException("cannot write to file " + fileName); ! FileOutputStream os = new FileOutputStream(file, true); os.write(chunk, 0, length); os.close(); --- 929,933 ---- if (!file.canWrite()) throw new EXistException("cannot write to file " + fileName); ! FileOutputStream os = new FileOutputStream(file.getAbsolutePath(), true); os.write(chunk, 0, length); os.close(); |