Ignore ERROR_NOT_FOUND error when removing mount
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
db32798592
commit
7a36efd75e
@ -144,7 +144,7 @@ func Unmount(mount string, flags int) error {
|
||||
}
|
||||
|
||||
if err := bindfilter.RemoveFileBinding(mount); err != nil {
|
||||
if errno, ok := errors.Unwrap(err).(syscall.Errno); ok && errno == windows.ERROR_INVALID_PARAMETER {
|
||||
if errno, ok := errors.Unwrap(err).(syscall.Errno); ok && errno == windows.ERROR_INVALID_PARAMETER || errno == windows.ERROR_NOT_FOUND {
|
||||
// not a mount point
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user