lib/db: Fix non-truncated fileinfo loading (#6621)

This commit is contained in:
Audrius Butkevicius 2020-05-08 20:31:43 +01:00 committed by GitHub
parent 57ea8a1bf5
commit da99203dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,7 +167,7 @@ func (t *readOnlyTransaction) withHave(folder, device, prefix []byte, truncate b
if err != nil {
return err
}
if f, ok, err := t.getFileTrunc(key, true); err != nil {
if f, ok, err := t.getFileTrunc(key, truncate); err != nil {
return err
} else if ok && !fn(f) {
return nil