summaryrefslogtreecommitdiff
path: root/P2P
diff options
context:
space:
mode:
Diffstat (limited to 'P2P')
-rw-r--r--P2P/Annex.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/P2P/Annex.hs b/P2P/Annex.hs
index 93da9e69b..771a72126 100644
--- a/P2P/Annex.hs
+++ b/P2P/Annex.hs
@@ -91,10 +91,14 @@ runLocal runmode runner a = case a of
Left e -> return (Left (show e))
Right result -> runner (next result)
RemoveContent k next -> do
- v <- tryNonAsync $ lockContentForRemoval k $ \contentlock -> do
- removeAnnex contentlock
- logStatus k InfoMissing
- return True
+ v <- tryNonAsync $
+ ifM (Annex.Content.inAnnex key)
+ ( lockContentForRemoval k $ \contentlock -> do
+ removeAnnex contentlock
+ logStatus k InfoMissing
+ return True
+ , return True
+ )
case v of
Left e -> return (Left (show e))
Right result -> runner (next result)