Fix resuming a download when using curl.
Noticed a bug; when using curl a workaround for its empty file behavior overwrote the file content, so it never resumed and always started over.
This commit is contained in:
parent
0f6775f1ff
commit
36e6b8abbf
2 changed files with 3 additions and 1 deletions
|
@ -18,6 +18,7 @@ git-annex (6.20180317) UNRELEASED; urgency=medium
|
||||||
stat when run on a directory.
|
stat when run on a directory.
|
||||||
* info: Changed sorting of numcopies stats table, so it's ordered
|
* info: Changed sorting of numcopies stats table, so it's ordered
|
||||||
by the variance from the desired number of copies.
|
by the variance from the desired number of copies.
|
||||||
|
* Fix resuming a download when using curl.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Mon, 19 Mar 2018 23:13:59 -0400
|
-- Joey Hess <id@joeyh.name> Mon, 19 Mar 2018 23:13:59 -0400
|
||||||
|
|
||||||
|
|
|
@ -295,7 +295,8 @@ download' quiet url file uo = do
|
||||||
curl = do
|
curl = do
|
||||||
-- curl does not create destination file
|
-- curl does not create destination file
|
||||||
-- if the url happens to be empty, so pre-create.
|
-- if the url happens to be empty, so pre-create.
|
||||||
writeFile file ""
|
unlessM (doesFileExist file) $
|
||||||
|
writeFile file ""
|
||||||
go "curl" $ headerparams ++ quietopt "-sS" ++
|
go "curl" $ headerparams ++ quietopt "-sS" ++
|
||||||
[ Param "-f"
|
[ Param "-f"
|
||||||
, Param "-L"
|
, Param "-L"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue