1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Now --timestamping and --continue works well together.

This commit is contained in:
Giuseppe Scrivano 2010-07-11 15:47:18 +02:00
parent 04e4bd614d
commit b7f54921f6
3 changed files with 17 additions and 3 deletions

2
NEWS
View File

@ -31,6 +31,8 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
and -c influences the transferred data amount.
** GNU TLS backend works again.
** Now --timestamping and --continue works well together.
* Changes in Wget 1.12

View File

@ -1,3 +1,9 @@
2010-07-11 Giuseppe Scrivano <gscrivano@gnu.org>
* http.c (http_loop): New variable `force_full_retrieve'. If the remote
file is newer that the local one then inhibit -c.
Reported by: Caleb Cushing <xenoterracide@gmail.com>.
2010-07-09 Giuseppe Scrivano <gscrivano@gnu.org>
* css-url.c (get_urls_css_file): Use `wget_read_file' instead of

View File

@ -2609,6 +2609,7 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
struct_stat st;
bool send_head_first = true;
char *file_name;
bool force_full_retrieve = false;
/* Assert that no value for *LOCAL_FILE was passed. */
assert (local_file == NULL || *local_file == NULL);
@ -2732,7 +2733,9 @@ Spider mode enabled. Check if remote file exists.\n"));
*dt &= ~HEAD_ONLY;
/* Decide whether or not to restart. */
if (opt.always_rest
if (force_full_retrieve)
hstat.restval = hstat.len;
else if (opt.always_rest
&& got_name
&& stat (hstat.local_file, &st) == 0
&& S_ISREG (st.st_mode))
@ -2920,8 +2923,11 @@ The sizes do not match (local %s) -- retrieving.\n"),
}
}
else
{
force_full_retrieve = true;
logputs (LOG_VERBOSE,
_("Remote file is newer, retrieving.\n"));
}
logputs (LOG_VERBOSE, "\n");
}