inverted logic

This commit is contained in:
Joey Hess 2012-04-20 16:16:13 -04:00
parent e807502666
commit b65e257b13

View file

@ -177,8 +177,9 @@ checkDiskSpace destination key alreadythere = do
force <- Annex.getState Annex.force
case (free, keySize key) of
(Just have, Just need) -> do
let ok = need + reserve > have + alreadythere || force
unless ok $
let ok = (need + reserve <= have + alreadythere) || force
unless ok $ do
liftIO $ print (need, reserve, have, alreadythere)
needmorespace (need + reserve - have - alreadythere)
return ok
_ -> return True