mirror of https://github.com/k3s-io/k3s
fix IsLikelyNotMountPoint func on Windows
parent
e72d54981a
commit
5671cd81df
|
@ -145,7 +145,11 @@ func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) {
|
|||
}
|
||||
// If current file is a symlink, then it is a mountpoint.
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue