From 42e4145a170a12f557fbe58344bb115061452d2a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 22 Apr 2012 01:20:17 -0400 Subject: [PATCH] bugfixes --- Config.hs | 4 ++-- Utility/Url.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Config.hs b/Config.hs index 065ee48f39..3feb246e53 100644 --- a/Config.hs +++ b/Config.hs @@ -101,7 +101,7 @@ getDiskReserve = fromMaybe megabyte . readSize dataUnits - splitting it into lines. -} getHttpHeaders :: Annex [String] getHttpHeaders = do - cmd <- getConfig "annex.httpheaders-command" "" + cmd <- getConfig "annex.http-headers-command" "" if (null cmd) - then fromRepo $ Git.Config.getList "annex.httpheaders" + then fromRepo $ Git.Config.getList "annex.http-headers" else lines . snd <$> liftIO (pipeFrom "sh" ["-c", cmd]) diff --git a/Utility/Url.hs b/Utility/Url.hs index 465ef855c8..b75229e1bc 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -57,13 +57,13 @@ download :: URLString -> Headers -> [CommandParam] -> FilePath -> IO Bool download url headers options file = ifM (inPath "wget") (wget , curl) where headerparams = map (\h -> Param $ "--header=" ++ h) headers - wget = go "wget" $ Params "-c -O" : headerparams + wget = go "wget" $ headerparams ++ [Params "-c -O"] {- Uses the -# progress display, because the normal - one is very confusing when resuming, showing - the remainder to download as the whole file, - and not indicating how much percent was - downloaded before the resume. -} - curl = go "curl" $ Params "-L -C - -# -o" : headerparams + curl = go "curl" $ headerparams ++ [Params "-L -C - -# -o"] go cmd opts = boolSystem cmd $ options++opts++[File file, File url]