Skip to content

Commit

Permalink
nit: use PathError when stat fails on normalize.
Browse files Browse the repository at this point in the history
Signed-off-by: Manu Gupta <manugupt1@gmail.com>
  • Loading branch information
manugupt1 committed Apr 26, 2022
1 parent 7335f4f commit ed95ac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mountinfo/mounted_unix.go
Expand Up @@ -38,7 +38,7 @@ func normalizePath(path string) (realPath string, err error) {
return "", err
}
if _, err := os.Stat(realPath); err != nil {
return "", err
return "", &os.PathError{Op: "stat", Path: realPath, Err: err}
}
return realPath, nil
}
Expand Down

0 comments on commit ed95ac1

Please sign in to comment.