Handling empty file, but something is fishy
diff --git a/src/object-manager.cc b/src/object-manager.cc
index cf94a7b..0733e22 100644
--- a/src/object-manager.cc
+++ b/src/object-manager.cc
@@ -82,6 +82,14 @@
segment ++;
}
+ if (segment == 0) // handle empty files
+ {
+ Name name = Name (deviceName)("file")(fileHash->GetHash (), fileHash->GetHashBytes ())(0);
+ Bytes data = m_ccnx->createContentObject (name, 0, 0);
+ fileDb.saveContentObject (deviceName, 0, data);
+
+ segment ++;
+ }
return make_tuple (fileHash, segment);
}