diff options
author | Raphael Krupinski <rafalkrupinski@users.noreply.github.com> | 2020-06-11 14:59:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 14:59:01 +0200 |
commit | 83d03a5201f49552fad35302bfea31db2e447188 (patch) | |
tree | 3fb26dbab849adf808c9bf4a7f2e8a75a25b6a1d /hugofs | |
parent | fc0f13b68451a09a6d6b4ce50c4217313b664176 (diff) |
hugofs: Use os.PathError in RootMappingFs.doLstat
Diffstat (limited to 'hugofs')
-rw-r--r-- | hugofs/rootmapping_fs.go | 4 |
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 |