hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 83d03a5201f49552fad35302bfea31db2e447188
parent fc0f13b68451a09a6d6b4ce50c4217313b664176
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:
Mhugofs/rootmapping_fs.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
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