Handling empty file, but something is fishy
diff --git "a/src/.\043object-manager.cc" "b/src/.\043object-manager.cc"
new file mode 120000
index 0000000..0a98ad3
--- /dev/null
+++ "b/src/.\043object-manager.cc"
@@ -0,0 +1 @@
+cawka@cawka-mac.9794
\ No newline at end of file
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);
}