diff options
author | 2011-07-05 20:53:58 -0400 | |
---|---|---|
committer | 2011-07-05 20:53:58 -0400 | |
commit | 497b1e60926d822f8acdeb6f3df80f597e81086e (patch) | |
tree | e11fc1cbcd2a6989649390a620f2183a44f38ae5 /StatFS.hsc | |
parent | cab4ac247ca990a03537f7611b299efca8edaffe (diff) |
Fix sign bug in disk free space checking.
Giulio Eulisse reported that on OSX, bad free space numbers were being
shown. It thought he had negative free space.
While the documentation is not clear, especially across OS's, it seems
likely that statfs uses unsigned long. It doesn't make sense for any
numbers to be negative.
Diffstat (limited to 'StatFS.hsc')
-rw-r--r-- | StatFS.hsc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/StatFS.hsc b/StatFS.hsc index 0828f1378..feb82aa9a 100644 --- a/StatFS.hsc +++ b/StatFS.hsc @@ -96,7 +96,7 @@ foreign import ccall unsafe "sys/vfs.h statfs64" c_statfs :: CString -> Ptr CStatfs -> IO CInt #endif -toI :: CLong -> Integer +toI :: CULong -> Integer toI = toInteger getFileSystemStats :: String -> IO (Maybe FileSystemStats) |