summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-12-09 12:47:57 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-12-09 12:48:22 -0400
commitd23a240b2c63958d1d7c647383bccba2246c0db0 (patch)
treefc3c917b38667ef9b0403123dd18fd7f75291037
parent2aed73a7e5fe72e6827dec72ced94c014ee7e262 (diff)
content removal is supposed to succed if the content was already not present
-rw-r--r--P2P/Annex.hs12
-rw-r--r--doc/todo/tor.mdwn3
2 files changed, 8 insertions, 7 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)
diff --git a/doc/todo/tor.mdwn b/doc/todo/tor.mdwn
index ce8d8e98a..11d441dab 100644
--- a/doc/todo/tor.mdwn
+++ b/doc/todo/tor.mdwn
@@ -12,9 +12,6 @@ Current todo list:
object is already in progress, the message about this is output by the
remotedaemon --debug, but not forwarded to the peer, which shows
"Connection reset by peer"
-* git annex drop --from peer1, when the peer does not have a file,
- shows "<socket: 18>: hGetLine: end of file"; the peer has closed the
- connection.
* Think about locking some more. What happens if the connection to the peer
is dropped while we think we're locking content there from being dropped?