diff options
author | 2012-04-20 16:16:13 -0400 | |
---|---|---|
committer | 2012-04-20 16:16:13 -0400 | |
commit | b65e257b13773bd44ccf9cc734c42927e94ed929 (patch) | |
tree | 9eb3ffe5e54b85c8ef0ad6db0f2c8bc48ae8e07a /Annex/Content.hs | |
parent | e807502666b2fd649f133766be7a605a6338d9b2 (diff) |
inverted logic
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r-- | Annex/Content.hs | 5 |
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 |