mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Fix error handling in SymbolicWalk
This commit is contained in:
parent
bfe8009415
commit
dbfc7ea024
1 changed files with 4 additions and 4 deletions
|
@ -453,14 +453,14 @@ func SymbolicWalk(fs afero.Fs, root string, walker filepath.WalkFunc) error {
|
|||
// Handle the root first
|
||||
fileInfo, err := lstatIfOs(fs, root)
|
||||
|
||||
if err != nil || !fileInfo.IsDir() {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return walker(root, nil, err)
|
||||
}
|
||||
|
||||
if !fileInfo.IsDir() {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := walker(root, fileInfo, err); err != nil && err != filepath.SkipDir {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue