Author: toad
Date: 2007-04-26 11:59:31 +0000 (Thu, 26 Apr 2007)
New Revision: 12973
Modified:
trunk/freenet/src/freenet/support/io/PersistentTempBucketFactory.java
Log:
logging
Modified: trunk/freenet/src/freenet/support/io/PersistentTempBucketFactory.java
===================================================================
--- trunk/freenet/src/freenet/support/io/PersistentTempBucketFactory.java
2007-04-26 11:53:59 UTC (rev 12972)
+++ trunk/freenet/src/freenet/support/io/PersistentTempBucketFactory.java
2007-04-26 11:59:31 UTC (rev 12973)
@@ -41,6 +41,7 @@
private final LinkedList bucketsToFree;
public PersistentTempBucketFactory(File dir, String prefix,
RandomSource rand) throws IOException {
+ boolean logMINOR = Logger.shouldLog(Logger.MINOR, this);
this.dir = dir.getAbsoluteFile();
this.rand = rand;
this.fg = new FilenameGenerator(rand, false, dir, prefix);
@@ -65,7 +66,10 @@
Logger.minor(this, "Ignoring "+name);
continue;
}
- originalFiles.add(f.getAbsoluteFile());
+ f = f.getAbsoluteFile();
+ if(logMINOR)
+ Logger.minor(this, "Found "+f);
+ originalFiles.add(f);
}
}
bucketsToFree = new LinkedList();
@@ -73,7 +77,8 @@
public void register(File file) {
synchronized(this) {
- if(!originalFiles.remove(file.getAbsoluteFile()))
+ file = file.getAbsoluteFile();
+ if(!originalFiles.remove(file))
Logger.error(this, "Preserving "+file+" but it
wasn't found!", new Exception("error"));
}
}