diff options
author | Joey Hess <joey@kitenet.net> | 2011-03-23 01:06:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-03-23 01:06:14 -0400 |
commit | 1161fa8bdffbf2c83351024fdd653beefe050f82 (patch) | |
tree | 7b3512895f33e3b2ca31aae786611a385fff8e1e /Content.hs | |
parent | 376fc65d3e5a16e7d3b5dc8bf2dd35d72a28c2c7 (diff) |
add units to disk size check message
Diffstat (limited to 'Content.hs')
-rw-r--r-- | Content.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Content.hs b/Content.hs index 39a3addcc..2a3106c10 100644 --- a/Content.hs +++ b/Content.hs @@ -39,6 +39,7 @@ import qualified Annex import Utility import StatFS import Key +import DataUnits {- Checks if a given key is currently present in the gitAnnexLocation. -} inAnnex :: Key -> Annex Bool @@ -129,11 +130,10 @@ checkDiskSpace' adjustment key = do (Just (FileSystemStats { fsStatBytesAvailable = have }), Just need) -> if (need + reserve > have + adjustment) then error $ "not enough free space (have " ++ - showsize (have + adjustment) ++ "; need " ++ - showsize (need + reserve) ++ ")" + roughSize True (have + adjustment) ++ "; need " ++ + roughSize True (need + reserve) ++ ")" else return () where - showsize i = show i megabyte :: Integer megabyte = 1024 * 1024 |