Don't dirty blockmap key between lookups (fixes #2455)

This commit is contained in:
Jakob Borg 2015-11-13 15:44:30 +01:00
parent 56f1c295b6
commit 2f12d41d9d

View File

@ -214,6 +214,9 @@ func blockKeyInto(o, hash []byte, folder, file string) []byte {
} }
o[0] = KeyTypeBlock o[0] = KeyTypeBlock
copy(o[1:], []byte(folder)) copy(o[1:], []byte(folder))
for i := len(folder); i < 64; i++ {
o[1+i] = 0
}
copy(o[1+64:], []byte(hash)) copy(o[1+64:], []byte(hash))
copy(o[1+64+32:], []byte(file)) copy(o[1+64+32:], []byte(file))
return o return o