summaryrefslogtreecommitdiff
path: root/Annex/Direct.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Direct.hs')
-rw-r--r--Annex/Direct.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index e5c1c47c8..08a15e180 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -383,10 +383,10 @@ removeDirect :: Key -> FilePath -> Annex ()
removeDirect k f = do
void $ removeAssociatedFileUnchecked k f
unlessM (inAnnex k) $
- ifM (goodContent k f)
- ( moveAnnex k f
- , logStatus k InfoMissing
- )
+ -- 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
liftIO $ do
nukeFile f
void $ tryIO $ removeDirectory $ parentDir f