improve free space needed display

This commit is contained in:
Joey Hess 2011-03-23 10:52:40 -04:00
parent 04539d1671
commit b0eccb003a

View file

@ -129,9 +129,9 @@ checkDiskSpace' adjustment key = do
(_, Nothing) -> return () (_, Nothing) -> return ()
(Just (FileSystemStats { fsStatBytesAvailable = have }), Just need) -> (Just (FileSystemStats { fsStatBytesAvailable = have }), Just need) ->
if (need + reserve > have + adjustment) if (need + reserve > have + adjustment)
then error $ "not enough free space (have " ++ then error $ "not enough free space, need " ++
roughSize True (have + adjustment) ++ "; need " ++ roughSize True (need + reserve - have - adjustment) ++
roughSize True (need + reserve) ++ ")" " more"
else return () else return ()
where where
megabyte :: Integer megabyte :: Integer