Author: toad
Date: 2006-10-31 18:49:52 +0000 (Tue, 31 Oct 2006)
New Revision: 10763

Modified:
   trunk/freenet/src/freenet/keys/Key.java
Log:
Fix "Too big" internal error when inserting full CHKs as part of splitfile 
healing.

Modified: trunk/freenet/src/freenet/keys/Key.java
===================================================================
--- trunk/freenet/src/freenet/keys/Key.java     2006-10-31 18:47:33 UTC (rev 
10762)
+++ trunk/freenet/src/freenet/keys/Key.java     2006-10-31 18:49:52 UTC (rev 
10763)
@@ -200,7 +200,8 @@
                }
         }
         if(finalData == null) {
-            if(sourceData.size() > maxCompressedDataLength) {
+               // Not compressed or not compressible; no size bytes to be 
added.
+            if(sourceData.size() > MAX_COMPRESSED_DATA_LENGTH) {
                 throw new CHKEncodeException("Too big");
             }
                finalData = BucketTools.toByteArray(sourceData);


Reply via email to