lib/model: Only log at info level if setting change time fails (#8725)

This commit is contained in:
Simon Frei 2022-12-21 21:58:35 +01:00 committed by GitHub
parent f9d68474ac
commit d157d12037
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1778,7 +1778,11 @@ loop:
// use this change time to check for changes to xattrs etc
// on next scan.
if err := f.updateFileInfoChangeTime(&job.file); err != nil {
l.Warnf("Error updating metadata for %v at database commit: %v", job.file.Name, err)
// This means on next scan the likely incorrect change time
// (resp. whatever caused the error) will cause this file to
// change. Log at info level to leave a trace if a user
// notices, but no need to warn
l.Infof("Error updating metadata for %v at database commit: %v", job.file.Name, err)
}
}
job.file.Sequence = 0