From c3982691ac7c46a7122940e5957678ddff9f12c2 Mon Sep 17 00:00:00 2001 From: yue9944882 <291271447@qq.com> Date: Thu, 18 Jan 2018 13:52:47 +0800 Subject: [PATCH] bugfix(mount): lstat with abs path of parent instead of '/..' --- pkg/util/mount/mount_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/mount/mount_linux.go b/pkg/util/mount/mount_linux.go index 71064f321e..af06501866 100644 --- a/pkg/util/mount/mount_linux.go +++ b/pkg/util/mount/mount_linux.go @@ -265,7 +265,7 @@ func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) { if err != nil { return true, err } - rootStat, err := os.Lstat(file + "/..") + rootStat, err := os.Lstat(filepath.Dir(strings.TrimSuffix(file, "/"))) if err != nil { return true, err }