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.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/swarm/api/manifest.go b/swarm/api/manifest.go
index dbaaf4bff..e251620a7 100644
--- a/swarm/api/manifest.go
+++ b/swarm/api/manifest.go
@@ -237,12 +237,12 @@ func (self *manifestTrie) addEntry(entry *manifestTrieEntry, quitC chan bool) {
}
b := byte(entry.Path[0])
- if (self.entries[b] == nil) || (self.entries[b].Path == entry.Path) {
+ oldentry := self.entries[b]
+ if (oldentry == nil) || (oldentry.Path == entry.Path && oldentry.ContentType != ManifestType) {
self.entries[b] = entry
return
}
- oldentry := self.entries[b]
cpl := 0
for (len(entry.Path) > cpl) && (len(oldentry.Path) > cpl) && (entry.Path[cpl] == oldentry.Path[cpl]) {
cpl++