ref: 83d03a5201f49552fad35302bfea31db2e447188
parent: fc0f13b68451a09a6d6b4ce50c4217313b664176
author: Raphael Krupinski <rafalkrupinski@users.noreply.github.com>
date: Thu Jun 11 10:59:01 EDT 2020
hugofs: Use os.PathError in RootMappingFs.doLstat
--- a/hugofs/rootmapping_fs.go
+++ b/hugofs/rootmapping_fs.go
@@ -493,7 +493,7 @@
// 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 @@
}
if err == nil {
- err = os.ErrNotExist
+ err = &os.PathError{Op: "LStat", Path: name, Err: err}
}
return nil, err