Repair incorrect global entries at startup

This commit is contained in:
Jakob Borg
2014-10-30 16:48:14 +01:00
parent 3a98f01d31
commit b0d95d02be
2 changed files with 66 additions and 0 deletions

View File

@@ -53,6 +53,8 @@ func NewSet(folder string, db *leveldb.DB) *Set {
blockmap: NewBlockMap(db, folder),
}
ldbCheckGlobals(db, []byte(folder))
var deviceID protocol.DeviceID
ldbWithAllFolderTruncated(db, []byte(folder), func(device []byte, f protocol.FileInfoTruncated) bool {
copy(deviceID[:], device)