mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Don't clobber the file when -c fails in the first attempt.
This commit is contained in:
parent
3b00da8f9a
commit
05a000a477
@ -1,3 +1,8 @@
|
|||||||
|
2005-05-17 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* http.c (http_loop): Don't clobber the file when -c is specified
|
||||||
|
and the first attempt to retrieve the file fails.
|
||||||
|
|
||||||
2005-05-16 Hrvoje Niksic <hniksic@xemacs.org>
|
2005-05-16 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* openssl.c (ssl_check_certificate): Print all issues with a
|
* openssl.c (ssl_check_certificate): Print all issues with a
|
||||||
|
17
src/http.c
17
src/http.c
@ -2141,13 +2141,18 @@ File `%s' already there, will not retrieve.\n"), *hstat.local_file);
|
|||||||
*dt &= ~HEAD_ONLY;
|
*dt &= ~HEAD_ONLY;
|
||||||
|
|
||||||
/* Decide whether or not to restart. */
|
/* Decide whether or not to restart. */
|
||||||
hstat.restval = 0;
|
if (opt.always_rest
|
||||||
if (count > 1)
|
&& stat (locf, &st) == 0
|
||||||
hstat.restval = hstat.len; /* continue where we left off */
|
&& S_ISREG (st.st_mode))
|
||||||
else if (opt.always_rest
|
/* When -c is used, continue from on-disk size. (Can't use
|
||||||
&& stat (locf, &st) == 0
|
hstat.len even if count>1 because we don't want a failed
|
||||||
&& S_ISREG (st.st_mode))
|
first attempt to clobber existing data.) */
|
||||||
hstat.restval = st.st_size;
|
hstat.restval = st.st_size;
|
||||||
|
else if (count > 1)
|
||||||
|
/* otherwise, continue where the previous try left off */
|
||||||
|
hstat.restval = hstat.len;
|
||||||
|
else
|
||||||
|
hstat.restval = 0;
|
||||||
|
|
||||||
/* Decide whether to send the no-cache directive. We send it in
|
/* Decide whether to send the no-cache directive. We send it in
|
||||||
two cases:
|
two cases:
|
||||||
|
Loading…
Reference in New Issue
Block a user