diff options
Diffstat (limited to 'Command/Get.hs')
-rw-r--r-- | Command/Get.hs | 9 |
1 files changed, 5 insertions, 4 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 + ) |