diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-13 14:52:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-13 14:52:49 -0400 |
commit | 45c39a20a4ded47f0775c113b50735326558cf17 (patch) | |
tree | 5af3ea8ef1c7b5893564477e1944e29f44ac2db6 /Utility/Url.hs | |
parent | fa7934c035ff09b46d646353683c6d9745f0c94d (diff) |
Android: Avoid passing --clobber to busybox wget.
Diffstat (limited to 'Utility/Url.hs')
-rw-r--r-- | Utility/Url.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Utility/Url.hs b/Utility/Url.hs index 03c311fd2..2cbab77c8 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -125,7 +125,15 @@ download' quiet url headers options file ua = _ -> return False where headerparams = map (\h -> Param $ "--header=" ++ h) headers - wget = go "wget" $ headerparams ++ quietopt "-q" ++ [Params "--clobber -c -O"] + wget = go "wget" $ headerparams ++ quietopt "-q" ++ wgetparams + {- Regular wget needs --clobber to continue downloading an existing + - file. On Android, busybox wget is used, which does not + - support, or need that option. -} +#ifndef __ANDROID__ + wgetparams = [Params "--clobber -c -O"] +#else + wgetparams = [Params "-c -O"] +#endif {- Uses the -# progress display, because the normal - one is very confusing when resuming, showing - the remainder to download as the whole file, |