summaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-29 14:07:26 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-29 14:07:26 -0400
commitd92f186fc4bc34e0999a6e47f15e54717e0ab206 (patch)
tree44e88f8716937d65d4ec70f425f2b0ed986872d9 /Backend
parentfa04c36fbe6bd9e936a74230bc8e887a90250bfd (diff)
convert safeSystem to boolSystem
to fix ctrl-c handling
Diffstat (limited to 'Backend')
-rw-r--r--Backend/URL.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/Backend/URL.hs b/Backend/URL.hs
index fd55ddf01..7f0bd6673 100644
--- a/Backend/URL.hs
+++ b/Backend/URL.hs
@@ -7,7 +7,6 @@
module Backend.URL (backend) where
-import Control.Exception
import Control.Monad.State (liftIO)
import Data.String.Utils
import System.Cmd
@@ -16,6 +15,7 @@ import System.Exit
import TypeInternals
import Core
+import Utility
backend = Backend {
name = "URL",
@@ -42,10 +42,6 @@ downloadUrl :: Key -> FilePath -> Annex Bool
downloadUrl key file = do
showNote "downloading"
liftIO $ putStrLn "" -- make way for curl progress bar
- result <- liftIO $ (try curl::IO (Either SomeException ()))
- case result of
- Left err -> return False
- Right succ -> return True
+ liftIO $ boolSystem "curl" ["-#", "-o", file, url]
where
- curl = safeSystem "curl" ["-#", "-o", file, url]
url = join ":" $ drop 1 $ split ":" $ show key