aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/manifest.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/api/manifest.go')
-rw-r--r--swarm/api/manifest.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/swarm/api/manifest.go b/swarm/api/manifest.go
index a289c01f9..d6dc24c48 100644
--- a/swarm/api/manifest.go
+++ b/swarm/api/manifest.go
@@ -62,6 +62,11 @@ func readManifest(manifestReader storage.LazySectionReader, hash storage.Key, dp
// TODO check size for oversized manifests
size, err := manifestReader.Size(quitC)
+ if err != nil { // size == 0
+ // can't determine size means we don't have the root chunk
+ err = fmt.Errorf("Manifest not Found")
+ return
+ }
manifestData := make([]byte, size)
read, err := manifestReader.Read(manifestData)
if int64(read) < size {