Fix cleanupMountpoint issue for Windows

For windows, after unmount, the symlink is already removed. The previous
logic uses removePathIfNotMountPoint which will return error if
path no longer exist.

This PR add the logic to return no error after unmount and path is no
longer exist.

Change-Id: Ie90ee698c95c3d2f0db8f13e3a8761638424c066
This commit is contained in:
Jing Xu 2021-04-26 12:44:26 -07:00
parent 6aa683e9cf
commit 84c2a5518e

View File

@ -122,6 +122,10 @@ func removePathIfNotMountPoint(mountPath string, mounter Interface, extensiveMou
}
if err != nil {
if os.IsNotExist(err) {
klog.V(4).Infof("%q does not exist", mountPath)
return true, nil
}
return notMnt, err
}