Handle errors during filesystem walk
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 30 Jul 2016 12:02:53 +0000 (14:02 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 30 Jul 2016 12:03:38 +0000 (14:03 +0200)
Fixes #2318

helpers/path.go

index 5a8694f1529d0226ef37513e170619d5805cb5d4..a31f33948161a8545d8936b57898aea2ae4b952d 100644 (file)
@@ -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