Skip to content

Commit

Permalink
TWEAK: use Errno != 0 to check for error.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-smith committed Dec 19, 2018
1 parent 8c86145 commit 2bb152f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/ffldb/disk_windows.go
Expand Up @@ -19,7 +19,7 @@ func getAvailableDiskSpace(path string) (uint64, error) {
var freeBytes, totalBytes, availBytes int64
_, _, err := c.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(path))),
uintptr(unsafe.Pointer(&freeBytes)), uintptr(unsafe.Pointer(&totalBytes)), uintptr(unsafe.Pointer(&availBytes)))
if err != nil && err.Error() != "The operation completed successfully." {
if err != nil && err.(syscall.Errno) != 0 {
return 0, err
}

Expand Down

0 comments on commit 2bb152f

Please sign in to comment.