mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
hugofs: Use os.PathError in RootMappingFs.doLstat
This commit is contained in:
parent
fc0f13b684
commit
83d03a5201
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue