diff --git a/disk/disk_windows.go b/disk/disk_windows.go index 6aa47a702b..40d2de9ea8 100644 --- a/disk/disk_windows.go +++ b/disk/disk_windows.go @@ -6,6 +6,7 @@ package disk import ( "bytes" "context" + "errors" "fmt" "syscall" "unsafe" @@ -125,6 +126,9 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro if typeret == 5 || typeret == 2 { continue // device is not ready will happen if there is no disk in the drive } + if errors.Is(err, windows.ERROR_OPERATION_ABORTED) { + continue + } warnings.Add(err) continue }