Author: toad
Date: 2008-06-19 16:29:03 +0000 (Thu, 19 Jun 2008)
New Revision: 20498

Modified:
   branches/db4o/freenet/src/freenet/support/io/PersistentTempBucketFactory.java
Log:
Turn off deletion of persistent temp files

Modified: 
branches/db4o/freenet/src/freenet/support/io/PersistentTempBucketFactory.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/support/io/PersistentTempBucketFactory.java   
    2008-06-19 16:21:25 UTC (rev 20497)
+++ 
branches/db4o/freenet/src/freenet/support/io/PersistentTempBucketFactory.java   
    2008-06-19 16:29:03 UTC (rev 20498)
@@ -93,13 +93,17 @@
         * Deletes any old temp files still unclaimed.
         */
        public synchronized void completedInit() {
-               Iterator i = originalFiles.iterator();
-               while(i.hasNext()) {
-                       File f = (File) (i.next());
-                       if(Logger.shouldLog(Logger.MINOR, this))
-                               Logger.minor(this, "Deleting old tempfile "+f);
-                       f.delete();
-               }
+               // Persisting requests in the database means we don't 
register() files...
+               // So keep all the temp files for now.
+               // FIXME: tidy up unwanted temp files.
+               
+//             Iterator i = originalFiles.iterator();
+//             while(i.hasNext()) {
+//                     File f = (File) (i.next());
+//                     if(Logger.shouldLog(Logger.MINOR, this))
+//                             Logger.minor(this, "Deleting old tempfile "+f);
+//                     f.delete();
+//             }
                originalFiles = null;
        }



Reply via email to