mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Also consider wrapped errors when checking for file IsNotExist errors
Fixes #10534
This commit is contained in:
@@ -258,7 +258,7 @@ func (r *Spec) newResource(sourceFs afero.Fs, fd ResourceSourceDescriptor) (reso
|
||||
var err error
|
||||
fi, err = sourceFs.Stat(fd.SourceFilename)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
if herrors.IsNotExist(err) {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user