lib/db: Actually delete the correct sequence prefix

This commit is contained in:
Jakob Borg 2018-05-09 12:06:29 +02:00
parent 506181599c
commit fb198a0645

View File

@ -541,7 +541,7 @@ func (db *Instance) dropFolder(folder []byte) {
// Remove all sequences related to the folder
sequenceKey := db.sequenceKey([]byte(folder), 0)
dbi = t.NewIterator(util.BytesPrefix(sequenceKey[:4]), nil)
dbi = t.NewIterator(util.BytesPrefix(sequenceKey[:keyPrefixLen+keyFolderLen]), nil)
for dbi.Next() {
db.Delete(dbi.Key(), nil)
}