Author: toad
Date: 2007-04-26 12:12:13 +0000 (Thu, 26 Apr 2007)
New Revision: 12976

Modified:
   trunk/freenet/src/freenet/support/io/FileBucket.java
Log:
Only register if it exists

Modified: trunk/freenet/src/freenet/support/io/FileBucket.java
===================================================================
--- trunk/freenet/src/freenet/support/io/FileBucket.java        2007-04-26 
12:10:55 UTC (rev 12975)
+++ trunk/freenet/src/freenet/support/io/FileBucket.java        2007-04-26 
12:12:13 UTC (rev 12976)
@@ -116,7 +116,8 @@
                } catch (NumberFormatException e) {
                        throw new CannotCreateFromFieldSetException("Corrupt 
length "+tmp, e);
                }
-               f.register(file);
+               if(file.exists()) // no point otherwise!
+                       f.register(file);
        }

        public OutputStream getOutputStream() throws IOException {


Reply via email to