fix bug introduced in 07f1e638ee

Just totally wrong logic, oops. Caught by test suite.
This commit is contained in:
Joey Hess 2017-02-28 13:24:26 -04:00
parent 75029536e5
commit 7a32e08c4a
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -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