mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 10:28:49 -07:00
Don't dirty blockmap key between lookups (fixes #2455)
This commit is contained in:
parent
56f1c295b6
commit
2f12d41d9d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user