commit | f2cbbac707714d6df6ca6e031a1d6a630e501edc | [log] [tgz] |
---|---|---|
author | Aman Gupta <aman@tmm1.net> | Mon May 08 21:23:46 2017 |
committer | GitHub <noreply@github.com> | Mon May 08 21:23:46 2017 |
tree | fb4689274fae40cf803c2e4ae76b7d33d2ead77f | |
parent | f7c38fa2f893474cdd88342539df9c1f9bd66668 [diff] |
Ignore GetVolumeInformation errors on DRIVE_REMOVABLE volumes
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 @@ 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