From f43cb33ca0db5774aae00eff9a8eb2c0264a30cc Mon Sep 17 00:00:00 2001 From: Manu Gupta Date: Mon, 25 Apr 2022 19:47:43 -0700 Subject: [PATCH] nit: use PathError when stat fails on normalize. Signed-off-by: Manu Gupta --- mountinfo/mounted_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mountinfo/mounted_unix.go b/mountinfo/mounted_unix.go index 242f82cc..ca28f25d 100644 --- a/mountinfo/mounted_unix.go +++ b/mountinfo/mounted_unix.go @@ -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 }