Author: toad
Date: 2006-08-16 19:43:19 +0000 (Wed, 16 Aug 2006)
New Revision: 10126
Modified:
trunk/freenet/src/freenet/client/async/SingleFileInserter.java
Log:
don't include MIME type where it's not needed
Modified: trunk/freenet/src/freenet/client/async/SingleFileInserter.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SingleFileInserter.java
2006-08-16 19:30:33 UTC (rev 10125)
+++ trunk/freenet/src/freenet/client/async/SingleFileInserter.java
2006-08-16 19:43:19 UTC (rev 10126)
@@ -284,6 +284,8 @@
/**
* Create a SplitHandler from a stored progress SimpleFieldSet.
+ * @param forceMetadata If true, the insert is metadata,
regardless of what the
+ * encompassing SplitFileInserter says (i.e. it's multi-level
metadata).
* @throws ResumeException Thrown if the resume fails.
* @throws InserterException Thrown if some other error
prevents the insert
* from starting.
@@ -298,7 +300,7 @@
if(sfiFS == null)
throw new ResumeException("No
SplitFileInserter");
ClientPutState newSFI, newMetaPutter = null;
- newSFI = new SplitFileInserter(parent, this,
block.clientMetadata, ctx, getCHKOnly, meta, token, insertAsArchiveManifest,
sfiFS);
+ newSFI = new SplitFileInserter(parent, this,
forceMetadata ? null : block.clientMetadata, ctx, getCHKOnly, meta, token,
insertAsArchiveManifest, sfiFS);
fs.removeSubset("SplitFileInserter");
SimpleFieldSet metaFS = fs.subset("MetadataPutter");
if(metaFS != null) {
@@ -307,7 +309,7 @@
if(type.equals("SplitFileInserter")) {
// FIXME
insertAsArchiveManifest ?!?!?!
newMetaPutter =
- new
SplitFileInserter(parent, this, block.clientMetadata, ctx, getCHKOnly, true,
token, insertAsArchiveManifest, metaFS);
+ new
SplitFileInserter(parent, this, null, ctx, getCHKOnly, true, token,
insertAsArchiveManifest, metaFS);
} else if(type.equals("SplitHandler")) {
newMetaPutter = new
SplitHandler();
((SplitHandler)newMetaPutter).start(metaFS, true);