Skip to content

gitserver: Handle and ignore filepath.Walk error

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

Loading