Author: nextgens
Date: 2008-08-25 20:31:15 +0000 (Mon, 25 Aug 2008)
New Revision: 22147
Modified:
trunk/freenet/src/freenet/support/io/TempBucketFactory.java
Log:
TempBuckets: if the bucket was immutable we want it to be still immutable after
the eventual migration
Modified: trunk/freenet/src/freenet/support/io/TempBucketFactory.java
===================================================================
--- trunk/freenet/src/freenet/support/io/TempBucketFactory.java 2008-08-25
20:29:39 UTC (rev 22146)
+++ trunk/freenet/src/freenet/support/io/TempBucketFactory.java 2008-08-25
20:31:15 UTC (rev 22147)
@@ -85,6 +85,8 @@
toMigrate = currentBucket;
Bucket tempFB = _makeFileBucket();
BucketTools.copy(currentBucket, tempFB);
+ if(toMigrate.isReadOnly())
+ tempFB.setReadOnly();
currentBucket = tempFB;
// We need streams to be reset to point to the
new bucket
shouldResetOS = true;