Skip to content
Snippets Groups Projects

gitserver: Handle and ignore filepath.Walk error

Merged Administrator requested to merge core/ignore-filepath-err into master

Created by: keegancsmith

filepath.Walk can return errors if we run into permission errors or a file disappears between readdir and the stat of the file. In either case this error isn't important for our cleanup, so we just ignore it. This is what we typically do in the rest of the gitserver uses of filepath.Walk

Previously we ignored the error completely, which would lead to info being nil => panic. This bug has existed for a long time, but is a hard to trip panic.

Fixes https://github.com/sourcegraph/sourcegraph/issues/6710

Merge request reports

Merged by avatar (Jul 5, 2025 3:31pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading