From: Bjørn Erik Pedersen Date: Sat, 30 Jul 2016 12:02:53 +0000 (+0200) Subject: Handle errors during filesystem walk X-Git-Tag: v0.17~209 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=94892726;p=brevno-suite%2Fhugo Handle errors during filesystem walk Fixes #2318 --- diff --git a/helpers/path.go b/helpers/path.go index 5a8694f1..a31f3394 100644 --- a/helpers/path.go +++ b/helpers/path.go @@ -487,7 +487,9 @@ func SymbolicWalk(fs afero.Fs, root string, walker filepath.WalkFunc) error { } for _, fi := range rootContent { - afero.Walk(fs, filepath.Join(root, fi.Name()), walker) + if err := afero.Walk(fs, filepath.Join(root, fi.Name()), walker); err != nil { + return err + } } return nil