Ignore GetVolumeInformation errors on DRIVE_REMOVABLE volumes

This commit is contained in:
Aman Gupta 2017-05-08 14:23:46 -07:00 committed by GitHub
parent f7c38fa2f8
commit f2cbbac707
1 changed files with 1 additions and 1 deletions

View File

@ -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