summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-08-15 14:17:05 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-08-15 14:17:05 -0400
commitf448a738b8322a07994831e256e3f46207ee4950 (patch)
treeb7ab0302e7994bd2c1e78c13965914c49b40de55 /Command
parentb38491100168141f2a1daa089a5416a92014ec25 (diff)
git-annex-shell sendkey: Don't fail if a remote asks for a key to be sent that already has a transfer lock file indicating it's being sent to that remote. The remote may have moved between networks, or reconnected.
Diffstat (limited to 'Command')
-rw-r--r--Command/SendKey.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Command/SendKey.hs b/Command/SendKey.hs
index a201d1b89..6b5127aca 100644
--- a/Command/SendKey.hs
+++ b/Command/SendKey.hs
@@ -47,3 +47,11 @@ fieldTransfer direction key a = do
(\u -> runTransfer (Transfer direction (toUUID u) key) afile noRetry a)
=<< Fields.getField Fields.remoteUUID
liftIO $ exitBool ok
+ where
+ {- Allow the key to be sent to the remote even if there seems to be
+ - another transfer of that key going on to that remote.
+ - That one may be stale, etc.
+ -}
+ runner
+ | direction == Upload = alwaysRunTransfer
+ | otherwise = runTransfer