mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Also consider wrapped errors when checking for file IsNotExist errors
Fixes #10534
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/bep/debounce"
|
||||
"github.com/gohugoio/hugo/common/herrors"
|
||||
"github.com/gohugoio/hugo/common/loggers"
|
||||
|
||||
"github.com/spf13/cast"
|
||||
@@ -539,7 +540,7 @@ func (c *collector) collectModulesTXT(owner Module) error {
|
||||
|
||||
f, err := c.fs.Open(filename)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
if herrors.IsNotExist(err) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user