Author: toad
Date: 2009-02-13 22:00:58 +0000 (Fri, 13 Feb 2009)
New Revision: 25632

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
Log:
No need to copy here if not persistent or if the bucket is persistence capable


Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2009-02-13 21:47:35 UTC (rev 25631)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2009-02-13 22:00:58 UTC (rev 25632)
@@ -231,7 +231,8 @@
                boolean noMetadata = ((block.clientMetadata == null) || 
block.clientMetadata.isTrivial()) && targetFilename == null;
                if(noMetadata && archiveType == null) {
                        if(fitsInOneBlockAsIs) {
-                               data = fixNotPersistent(data, context);
+                               if(persistent && (data instanceof 
NotPersistentBucket))
+                                       data = fixNotPersistent(data, context);
                                // Just insert it
                                ClientPutState bi =
                                        createInserter(parent, data, 
codecNumber, block.desiredURI, ctx, cb, metadata, (int)block.getData().size(), 
-1, getCHKOnly, true, true, container, context, freeData);

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to