From 7a36efd75e8b767511e63b0a22818726d902ceec Mon Sep 17 00:00:00 2001 From: Gabriel Adrian Samfira Date: Tue, 28 Feb 2023 14:31:26 -0800 Subject: [PATCH] Ignore ERROR_NOT_FOUND error when removing mount Signed-off-by: Gabriel Adrian Samfira --- mount/mount_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mount/mount_windows.go b/mount/mount_windows.go index a0ee0543e..fd4a2a60a 100644 --- a/mount/mount_windows.go +++ b/mount/mount_windows.go @@ -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 }