hugofs: Use os.PathError in RootMappingFs.doLstat - hugo - [fork] hugo port for 9front
(HTM) git clone git@git.drkhsh.at/hugo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit 83d03a5201f49552fad35302bfea31db2e447188
(DIR) parent fc0f13b68451a09a6d6b4ce50c4217313b664176
(HTM) Author: Raphael Krupinski <rafalkrupinski@users.noreply.github.com>
Date: Thu, 11 Jun 2020 14:59:01 +0200
hugofs: Use os.PathError in RootMappingFs.doLstat
Diffstat:
M hugofs/rootmapping_fs.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git 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