Commit 08ca867e authored by andyzhangx's avatar andyzhangx

fix IsLikelyNotMountPoint func on Windows

parent 2e433e81
...@@ -145,7 +145,11 @@ func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) { ...@@ -145,7 +145,11 @@ func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) {
} }
// If current file is a symlink, then it is a mountpoint. // If current file is a symlink, then it is a mountpoint.
if stat.Mode()&os.ModeSymlink != 0 { if stat.Mode()&os.ModeSymlink != 0 {
return false, nil target, err := os.Readlink(file)
if err != nil {
return true, fmt.Errorf("Readlink error: %v", err)
}
return !mounter.ExistsPath(target), nil
} }
return true, nil return true, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment