mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Ugly fix to make -nc without --content-disposition go back to not fetching files.
This commit is contained in:
parent
5dacf1191d
commit
c1b7382ec4
@ -6,6 +6,9 @@
|
||||
bugs (#22161, #20481)
|
||||
(get_eta, count_cols): Added to support the changes for
|
||||
create_image.
|
||||
* http.c (http_loop): Put no-clobber logic back into http_loop,
|
||||
before starting to fetch, for when we're not doing
|
||||
content-disposition.
|
||||
|
||||
2008-01-31 Micah Cowan <micah@cowan.name>
|
||||
|
||||
|
20
src/http.c
20
src/http.c
@ -2359,6 +2359,26 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
|
||||
got_name = true;
|
||||
}
|
||||
|
||||
/* TODO: Ick! This code is now in both gethttp and http_loop, and is
|
||||
* screaming for some refactoring. */
|
||||
if (got_name && file_exists_p (hstat.local_file) && opt.noclobber)
|
||||
{
|
||||
/* If opt.noclobber is turned on and file already exists, do not
|
||||
retrieve the file */
|
||||
logprintf (LOG_VERBOSE, _("\
|
||||
File `%s' already there; not retrieving.\n\n"),
|
||||
hstat.local_file);
|
||||
/* If the file is there, we suppose it's retrieved OK. */
|
||||
*dt |= RETROKF;
|
||||
|
||||
/* #### Bogusness alert. */
|
||||
/* If its suffix is "html" or "htm" or similar, assume text/html. */
|
||||
if (has_html_suffix_p (hstat.local_file))
|
||||
*dt |= TEXTHTML;
|
||||
|
||||
return RETRUNNEEDED;
|
||||
}
|
||||
|
||||
/* Reset the counter. */
|
||||
count = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user