diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-01-31 17:15:14 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-02-04 00:17:10 +0100 |
commit | 80dd6ddde27ce36f5432fb780e94d4974b5277c7 (patch) | |
tree | 99d0ba7eb2b343b4b65c4433a998d73af3182933 /hugofs/walk.go | |
parent | 299731012441378bb9c057ceb0a3c277108aaf01 (diff) |
Fix module mount in sub folder
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.
Fixes #6730
Diffstat (limited to 'hugofs/walk.go')
-rw-r--r-- | hugofs/walk.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/hugofs/walk.go b/hugofs/walk.go index 6947660c8..da6983f11 100644 --- a/hugofs/walk.go +++ b/hugofs/walk.go @@ -124,7 +124,6 @@ func (w *Walkway) Walk() error { if w.checkErr(w.root, err) { return nil } - return w.walkFn(w.root, nil, errors.Wrapf(err, "walk: %q", w.root)) } fi = info.(FileMetaInfo) @@ -154,6 +153,15 @@ func (w *Walkway) checkErr(filename string, err error) bool { logUnsupportedSymlink(filename, w.logger) return true } + + if os.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. + w.logger.WARN.Printf("File %q not found, skipping.", filename) + return true + } + return false } |