summaryrefslogtreecommitdiff
path: root/Annex/Content.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r--Annex/Content.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 494c9c10c..932f1b755 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -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