aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugofs/walk.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-12-14 12:20:13 +0100
committerBjørn Erik Pedersen <[email protected]>2022-12-14 13:51:06 +0100
commitad2059878a8d6ace9669ccc5ff0a8d4e5811ad37 (patch)
tree34d88705ab22e5b54949a6ce48e028b1fc2ab7e6 /hugofs/walk.go
parent87e898a17a52b5338bc9d554dd12b99a54aa2431 (diff)
downloadhugo-ad2059878a8d6ace9669ccc5ff0a8d4e5811ad37.tar.gz
hugo-ad2059878a8d6ace9669ccc5ff0a8d4e5811ad37.zip
Also consider wrapped errors when checking for file IsNotExist errors
Fixes #10534
Diffstat (limited to 'hugofs/walk.go')
-rw-r--r--hugofs/walk.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/hugofs/walk.go b/hugofs/walk.go
index 22a99402f..e847174c6 100644
--- a/hugofs/walk.go
+++ b/hugofs/walk.go
@@ -20,6 +20,7 @@ import (
"sort"
"strings"
+ "github.com/gohugoio/hugo/common/herrors"
"github.com/gohugoio/hugo/common/loggers"
"errors"
@@ -118,7 +119,7 @@ func (w *Walkway) Walk() error {
} else {
info, _, err := lstatIfPossible(w.fs, w.root)
if err != nil {
- if os.IsNotExist(err) {
+ if herrors.IsNotExist(err) {
return nil
}
@@ -154,7 +155,7 @@ func (w *Walkway) checkErr(filename string, err error) bool {
return true
}
- if os.IsNotExist(err) {
+ if herrors.IsNotExist(err) {
// The file may be removed in process.
// This may be a ERROR situation, but it is not possible
// to determine as a general case.