Merge pull request #613 from tmm1/allow-a-b-windows-drives

do not ignore A: and B: drives on windows
tags/v2.18.11
shirou 7 years ago committed by GitHub
commit 852c7686b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -83,9 +83,6 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
for _, v := range lpBuffer {
if v >= 65 && v <= 90 {
path := string(v) + ":"
if path == "A:" || path == "B:" { // skip floppy drives
continue
}
typepath, _ := windows.UTF16PtrFromString(path)
typeret, _, _ := procGetDriveType.Call(uintptr(unsafe.Pointer(typepath)))
if typeret == 0 {

Loading…
Cancel
Save