mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 14:52:04 -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
|
// Handle the root first
|
||||||
fileInfo, err := lstatIfOs(fs, root)
|
fileInfo, err := lstatIfOs(fs, root)
|
||||||
|
|
||||||
if err != nil || !fileInfo.IsDir() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return walker(root, nil, err)
|
return walker(root, nil, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !fileInfo.IsDir() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if err := walker(root, fileInfo, err); err != nil && err != filepath.SkipDir {
|
if err := walker(root, fileInfo, err); err != nil && err != filepath.SkipDir {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue