diff options
-rw-r--r-- | Command/Get.hs | 9 | ||||
-rw-r--r-- | Logs/Transfer.hs | 4 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | git-annex.cabal | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/Command/Get.hs b/Command/Get.hs index 95a7040bb..18153ce88 100644 --- a/Command/Get.hs +++ b/Command/Get.hs @@ -65,7 +65,8 @@ getKeyFile key file dest = dispatch =<< Remote.keyPossibilities key | Remote.hasKeyCheap r = either (const False) id <$> Remote.hasKey r key | otherwise = return True - docopy r continue = download (Remote.uuid r) key (Just file) $ do - showAction $ "from " ++ Remote.name r - ifM (Remote.retrieveKeyFile r key (Just file) dest) - ( return True , continue) + docopy r continue = do + ok <- download (Remote.uuid r) key (Just file) $ do + showAction $ "from " ++ Remote.name r + Remote.retrieveKeyFile r key (Just file) dest + if ok then return ok else continue diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index b6962262d..e7f35ccb7 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -98,8 +98,8 @@ transfer t file a = do writeFile tfile $ writeTransferInfo info return fd cleanup tfile fd = do - removeFile tfile - removeFile $ transferLockFile tfile + void $ tryIO $ removeFile tfile + void $ tryIO $ removeFile $ transferLockFile tfile closeFd fd {- If a transfer is still running, returns its TransferInfo. -} diff --git a/debian/changelog b/debian/changelog index 9b2ff3f14..f24326dd2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ git-annex (3.20120722) UNRELEASED; urgency=low * initremote: Avoid recording remote's description before checking that its config is valid. * unused, status: Avoid crashing when ran in bare repo. + * Avoid crashing when "git annex get" fails to download from one + location, and falls back to downloading from a second location. -- Joey Hess <joeyh@debian.org> Fri, 27 Jul 2012 21:04:47 -0400 diff --git a/git-annex.cabal b/git-annex.cabal index 15ac1e3d5..275388d59 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -1,5 +1,5 @@ Name: git-annex -Version: 3.20120721 +Version: 3.20120722 Cabal-Version: >= 1.8 License: GPL Maintainer: Joey Hess <joey@kitenet.net> |