Commit a8d394bf authored by Tim Hockin's avatar Tim Hockin

Don't panic if we hit a dangling symlink in mungedocs

parent 2906a35c
......@@ -158,6 +158,12 @@ func (f fileProcessor) visit(path string) error {
func newWalkFunc(fp *fileProcessor, changesNeeded *bool) filepath.WalkFunc {
return func(path string, info os.FileInfo, err error) error {
stat, err := os.Stat(path)
if err != nil {
if os.IsNotExist(err) {
return nil
}
return err
}
if path != *rootDir && stat.IsDir() && *norecurse {
return filepath.SkipDir
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment