lib/db: Don't panic on incorrect BlocksHash (fixes #6353) (#6355)

This commit is contained in:
Simon Frei 2020-02-22 16:51:23 +01:00 committed by Jakob Borg
parent 0fb2cd52ff
commit 4f29180e7c

View File

@ -469,8 +469,8 @@ func (t readWriteTransaction) putFile(key []byte, fi protocol.FileInfo) error {
return err
}
} else if fi.BlocksHash != nil {
l.Warnln("Blocks is nil, but BlocksHash is not for file", fi)
panic("Blocks is nil, but BlocksHash is not")
l.Debugln("Blocks is nil, but BlocksHash is not for file", fi)
fi.BlocksHash = nil
}
fi.Blocks = nil