Commit Graph
3 Commits
Author SHA1 Message Date
Paul "TBBle" Hampson 0966e1ad56 Correct GetVolumeInformation return type handling
The _docs_ say it returns 0 for failure, non-zero for success.

This implementation is looking for <0 as HRESULT failure, and deriving
an Errno from that.

The new tests fail with GetFileSystemType as it was defined, e.g.,
```
--- FAIL: TestGetFSTypeOfValidButAbsentDrive (0.00s)
    fs_windows_test.go:41: GetFileSystemType a:\ unexpectedly succeeded
```
when I definitely do not have an A:\ drive.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2021-01-16 17:11:37 +11:00
Eric Hotinger 28396ed851 Updates the error message in GetFileSystemType to match the function's
casing and exports the error.

Signed-off-by: Eric Hotinger <ehotinger@gmail.com>
2019-07-01 14:25:30 -07:00
Eric Hotinger 9fe4f5c769 Adds a file system helper file for determining the file system type.
Signed-off-by: Eric Hotinger <ehotinger@gmail.com>
2019-06-25 13:42:09 -07:00