Author: toad
Date: 2007-04-26 12:06:18 +0000 (Thu, 26 Apr 2007)
New Revision: 12974
Modified:
trunk/freenet/src/freenet/support/io/PersistentTempBucketFactory.java
Log:
getAbsoluteFile() does not remove /./'s. Use getCanonicalFile.
Modified: trunk/freenet/src/freenet/support/io/PersistentTempBucketFactory.java
===================================================================
--- trunk/freenet/src/freenet/support/io/PersistentTempBucketFactory.java
2007-04-26 11:59:31 UTC (rev 12973)
+++ trunk/freenet/src/freenet/support/io/PersistentTempBucketFactory.java
2007-04-26 12:06:18 UTC (rev 12974)
@@ -66,7 +66,7 @@
Logger.minor(this, "Ignoring "+name);
continue;
}
- f = f.getAbsoluteFile();
+ f = FileUtil.getCanonicalFile(f);
if(logMINOR)
Logger.minor(this, "Found "+f);
originalFiles.add(f);
@@ -77,7 +77,7 @@
public void register(File file) {
synchronized(this) {
- file = file.getAbsoluteFile();
+ file = FileUtil.getCanonicalFile(file);
if(!originalFiles.remove(file))
Logger.error(this, "Preserving "+file+" but it
wasn't found!", new Exception("error"));
}