Prevent errors from stopping scan

This commit is contained in:
WithoutPants 2022-10-11 14:20:24 +11:00 committed by GitHub
parent b1193227d0
commit 6ce409cd56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -197,7 +197,9 @@ func (s *scanJob) queueFiles(ctx context.Context, paths []string) error {
func (s *scanJob) queueFileFunc(ctx context.Context, f FS, zipFile *scanFile) fs.WalkDirFunc {
return func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
// don't let errors prevent scanning
logger.Errorf("error scanning %s: %v", path, err)
return nil
}
if err = ctx.Err(); err != nil {