Author: toad
Date: 2009-01-27 20:09:39 +0000 (Tue, 27 Jan 2009)
New Revision: 25333

Modified:
   
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
Log:
Fix Cooo's startup problem (hopefully!)


Modified: 
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
   2009-01-27 19:31:17 UTC (rev 25332)
+++ 
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
   2009-01-27 20:09:39 UTC (rev 25333)
@@ -71,7 +71,10 @@
 
        void onInit(ObjectContainer container, DBJobRunner jobRunner2, Random 
fastWeakRandom, File storageFile2, long blockSize2, Ticker ticker) throws 
IOException {
                container.activate(storageFile, 100);
-               if(storageFile2.getPath().equals(storageFile.getPath())) {
+               File oldFile = FileUtil.getCanonicalFile(storageFile);
+               File newFile = FileUtil.getCanonicalFile(storageFile2);
+               if(!(oldFile.equals(newFile) || 
+                               (File.separatorChar == '\\' ? 
oldFile.getPath().toLowerCase().equals(newFile.getPath().toLowerCase()) : 
oldFile.getPath().equals(newFile.getPath())))) {
                        if(blockSize != blockSize2)
                                throw new IllegalStateException("My block size 
is "+blockSize2+
                                                " but stored block size is 
"+blockSize+

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

Reply via email to