Treat bad network path error as non-existing folder during folder rename check (#6680)

* treat any error as missing folder
This commit is contained in:
WithoutPants 2026-03-16 17:32:43 +11:00 committed by GitHub
parent b4fab0ac48
commit e851d8d3bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,6 @@ package file
import (
"context"
"errors"
"fmt"
"io/fs"
@ -161,9 +160,7 @@ func (s *Scanner) detectFolderMove(ctx context.Context, file ScannedFile) (*mode
continue
}
if !errors.Is(err, fs.ErrNotExist) {
return fmt.Errorf("checking for parent folder %q: %w", pf.Path, err)
}
// treat any error as missing folder
// parent folder is missing, possible candidate
// count the total number of files in the existing folder