lib/db: Don't panic debugging an inexistent file (#7534)

This commit is contained in:
Simon Frei 2021-03-30 20:06:01 +02:00 committed by GitHub
parent 33212716cf
commit 7f0d4f6ba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -312,7 +312,7 @@ func (s *Snapshot) DebugGlobalVersions(file string) VersionList {
opStr := fmt.Sprintf("%s DebugGlobalVersions(%v)", s.folder, file)
l.Debugf(opStr)
vl, err := s.t.getGlobalVersions(nil, []byte(s.folder), []byte(osutil.NormalizedFilename(file)))
if backend.IsClosed(err) {
if backend.IsClosed(err) || backend.IsNotFound(err) {
return VersionList{}
} else if err != nil {
s.fatalError(err, opStr)