diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-09 12:47:57 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-09 12:48:22 -0400 |
commit | d23a240b2c63958d1d7c647383bccba2246c0db0 (patch) | |
tree | fc3c917b38667ef9b0403123dd18fd7f75291037 /P2P | |
parent | 2aed73a7e5fe72e6827dec72ced94c014ee7e262 (diff) |
content removal is supposed to succed if the content was already not present
Diffstat (limited to 'P2P')
-rw-r--r-- | P2P/Annex.hs | 12 |
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) |