Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/hugofs
diff options
context:
space:
mode:
authorRaphael Krupinski <rafalkrupinski@users.noreply.github.com>2020-06-11 15:59:01 +0300
committerGitHub <noreply@github.com>2020-06-11 15:59:01 +0300
commit83d03a5201f49552fad35302bfea31db2e447188 (patch)
tree3fb26dbab849adf808c9bf4a7f2e8a75a25b6a1d /hugofs
parentfc0f13b68451a09a6d6b4ce50c4217313b664176 (diff)
hugofs: Use os.PathError in RootMappingFs.doLstat
Diffstat (limited to 'hugofs')
-rw-r--r--hugofs/rootmapping_fs.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hugofs/rootmapping_fs.go b/hugofs/rootmapping_fs.go
index 283bb042d..ea3ef003e 100644
--- a/hugofs/rootmapping_fs.go
+++ b/hugofs/rootmapping_fs.go
@@ -493,7 +493,7 @@ func (fs *RootMappingFs) doLstat(name string) ([]FileMetaInfo, error) {
// Find any real files or directories with this key.
_, roots := fs.getRoots(key)
if roots == nil {
- return nil, os.ErrNotExist
+ return nil, &os.PathError{Op: "LStat", Path: name, Err: os.ErrNotExist}
}
var err error
@@ -512,7 +512,7 @@ func (fs *RootMappingFs) doLstat(name string) ([]FileMetaInfo, error) {
}
if err == nil {
- err = os.ErrNotExist
+ err = &os.PathError{Op: "LStat", Path: name, Err: err}
}
return nil, err