From 07c8f9a1731edae20b4e64020efc63ad3dc125e3 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Mon, 5 Sep 2016 20:45:22 -0700 Subject: [PATCH] Don't return an error if a file doesn't exist for IsPathDevice(...) --- pkg/util/mount/mount_linux.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/util/mount/mount_linux.go b/pkg/util/mount/mount_linux.go index 2c94f32d76a..0643f8704ca 100644 --- a/pkg/util/mount/mount_linux.go +++ b/pkg/util/mount/mount_linux.go @@ -208,6 +208,9 @@ func exclusiveOpenFailsOnDevice(pathname string) (bool, error) { func pathIsDevice(pathname string) (bool, error) { finfo, err := os.Stat(pathname) + if os.IsNotExist(err) { + return false, nil + } // err in call to os.Stat if err != nil { return false, err