From 72d3ba4191f2af0669ee5f3faa0f9c5e27e9c52f Mon Sep 17 00:00:00 2001 From: shirou Date: Sun, 25 Aug 2024 22:49:43 +0900 Subject: [PATCH] [disk][windows]: ignore network drive when not ready --- disk/disk_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk/disk_windows.go b/disk/disk_windows.go index 9fefb1465..4f371a332 100644 --- a/disk/disk_windows.go +++ b/disk/disk_windows.go @@ -133,7 +133,7 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro uintptr(unsafe.Pointer(&lpFileSystemNameBuffer[0])), uintptr(len(lpFileSystemNameBuffer))) if driveret == 0 { - if typeret == 5 || typeret == 2 { + if typeret == 2 || typeret == 4 || typeret == 5 { continue // device is not ready will happen if there is no disk in the drive } warnings.Add(err)