summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-02-28 13:24:26 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-02-28 13:24:26 -0400
commitc4ef3c78474a9a222e34652c4e3dacd22fa2ff7f (patch)
tree844fc7645348337ee8f539e9eb7a5471e1268482
parenta96b8b74311a52cc04e3d5e0d1d67628aa996693 (diff)
Just totally wrong logic, oops. Caught by test suite.
-rw-r--r--Annex/Direct.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index 08a15e180..7a88a8755 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -385,8 +385,11 @@ removeDirect k f = do
unlessM (inAnnex k) $
-- If moveAnnex rejects the content of the key,
-- treat that the same as its content having changed.
- whenM (goodContent k f <&&> moveAnnex k f) $
- logStatus k InfoMissing
+ ifM (goodContent k f)
+ ( unlessM (moveAnnex k f) $
+ logStatus k InfoMissing
+ , logStatus k InfoMissing
+ )
liftIO $ do
nukeFile f
void $ tryIO $ removeDirectory $ parentDir f