Author: toad
Date: 2009-01-27 22:55:54 +0000 (Tue, 27 Jan 2009)
New Revision: 25342
Modified:
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
Log:
Check block size first
Modified:
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
===================================================================
---
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
2009-01-27 22:55:08 UTC (rev 25341)
+++
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
2009-01-27 22:55:54 UTC (rev 25342)
@@ -73,12 +73,12 @@
container.activate(storageFile, 100);
File oldFile = FileUtil.getCanonicalFile(new
File(storageFile.getPath())); // db4o argh
File newFile = FileUtil.getCanonicalFile(new
File(storageFile2.getPath()));
+ if(blockSize != blockSize2)
+ throw new IllegalStateException("My block size is
"+blockSize2+
+ " but stored block size is "+blockSize+
+ " for same file "+storageFile);
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+
- " for same file "+storageFile);
} else {
if(!FileUtil.moveTo(storageFile, storageFile2, false))
throw new IOException("Unable to move temp blob
file from "+storageFile+" to "+storageFile2);
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs