From 497b1e60926d822f8acdeb6f3df80f597e81086e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 5 Jul 2011 20:53:58 -0400 Subject: [PATCH] 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. --- StatFS.hsc | 2 +- debian/changelog | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/StatFS.hsc b/StatFS.hsc index 0828f1378c..feb82aa9af 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) diff --git a/debian/changelog b/debian/changelog index 773c91b7eb..8d1a396cb5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +git-annex (3.20110706) UNRELEASED; urgency=low + + * Fix sign bug in disk free space checking. + + -- Joey Hess Tue, 05 Jul 2011 20:52:11 -0400 + git-annex (3.20110705) unstable; urgency=low * uninit: Delete the git-annex branch and .git/annex/