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
1 changed files with 3 additions and 0 deletions

View File

@ -214,6 +214,9 @@ func blockKeyInto(o, hash []byte, folder, file string) []byte {
}
o[0] = KeyTypeBlock
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+32:], []byte(file))
return o