bugfix
This commit is contained in:
parent
b8ba60428a
commit
4c3ad80f32
6 changed files with 26 additions and 22 deletions
|
@ -3,7 +3,8 @@
|
|||
|
||||
module Backend.Url (backend) where
|
||||
|
||||
import Control.Monad.State
|
||||
import Control.Monad.State (liftIO)
|
||||
import Data.String.Utils
|
||||
import System.Cmd
|
||||
import System.Exit
|
||||
import BackendTypes
|
||||
|
@ -30,9 +31,11 @@ dummyOk :: Key -> Annex Bool
|
|||
dummyOk url = return True
|
||||
|
||||
downloadUrl :: Key -> FilePath -> Annex Bool
|
||||
downloadUrl url file = do
|
||||
liftIO $ putStrLn $ "download: " ++ (show url)
|
||||
result <- liftIO $ rawSystem "curl" ["-#", "-o", file, (show url)]
|
||||
downloadUrl key file = do
|
||||
liftIO $ putStrLn $ "download: " ++ url
|
||||
result <- liftIO $ rawSystem "curl" ["-#", "-o", file, url]
|
||||
if (result == ExitSuccess)
|
||||
then return True
|
||||
else return False
|
||||
where
|
||||
url = join ":" $ drop 1 $ split ":" $ show key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue