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 GitHub
parent 4cc1b7f42c
commit 32e12abb43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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