From f2cbbac707714d6df6ca6e031a1d6a630e501edc Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Mon, 8 May 2017 14:23:46 -0700 Subject: [PATCH] Ignore GetVolumeInformation errors on DRIVE_REMOVABLE volumes --- 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 ca16a4a..b6c3542 100644 --- a/disk/disk_windows.go +++ b/disk/disk_windows.go @@ -103,7 +103,7 @@ func Partitions(all bool) ([]PartitionStat, error) { uintptr(unsafe.Pointer(&lpFileSystemNameBuffer[0])), uintptr(len(lpFileSystemNameBuffer))) if driveret == 0 { - if typeret == 5 { + if typeret == 5 || typeret == 2 { continue //device is not ready will happen if there is no disk in the drive } return ret, err