diff options
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Get.hs | 9 | ||||
-rw-r--r-- | Command/Move.hs | 7 |
2 files changed, 10 insertions, 6 deletions
diff --git a/Command/Get.hs b/Command/Get.hs index 5cb0245d9..e91798eba 100644 --- a/Command/Get.hs +++ b/Command/Get.hs @@ -109,9 +109,10 @@ getKey' key afile = dispatch | Remote.hasKeyCheap r = either (const False) id <$> Remote.hasKey r key | otherwise = return True - docopy r witness = getViaTmp (RemoteVerify r) key $ \dest -> - download (Remote.uuid r) key afile forwardRetry - (\p -> do + docopy r = download (Remote.uuid r) key afile forwardRetry $ \p -> + ifM (inAnnex key) + ( return True + , getViaTmp (RemoteVerify r) key $ \dest -> do showAction $ "from " ++ Remote.name r Remote.retrieveKeyFile r key afile dest p - ) witness + ) diff --git a/Command/Move.hs b/Command/Move.hs index b9e0b6548..9e6c03e3b 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -200,8 +200,11 @@ fromPerform src move key afile = do where go = notifyTransfer Download afile $ download (Remote.uuid src) key afile forwardRetry $ \p -> - getViaTmp (RemoteVerify src) key $ \t -> - Remote.retrieveKeyFile src key afile t p + ifM (inAnnex key) + ( return True + , getViaTmp (RemoteVerify src) key $ \t -> + Remote.retrieveKeyFile src key afile t p + ) dispatch _ False = stop -- failed dispatch False True = next $ return True -- copy complete -- Finish by dropping from remote, taking care to verify that |