mirror of
https://github.com/mirror/wget.git
synced 2025-01-04 01:10:28 +08:00
Use empty query in local filenames.
This commit is contained in:
parent
c6889dab18
commit
378c203079
@ -1,3 +1,7 @@
|
||||
2012-03-30 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||
|
||||
* url.c: Use empty query in local filenames.
|
||||
|
||||
2012-04-22 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||
|
||||
* main.c (main): Dynamically allocate `opt.progress_type'.
|
||||
|
@ -1502,7 +1502,7 @@ url_file_name (const struct url *u, char *replaced_filename)
|
||||
{
|
||||
struct growable fnres; /* stands for "file name result" */
|
||||
|
||||
const char *u_file, *u_query;
|
||||
const char *u_file;
|
||||
char *fname, *unique;
|
||||
char *index_filename = "index.html"; /* The default index file is index.html */
|
||||
|
||||
@ -1561,12 +1561,11 @@ url_file_name (const struct url *u, char *replaced_filename)
|
||||
u_file = *u->file ? u->file : index_filename;
|
||||
append_uri_pathel (u_file, u_file + strlen (u_file), false, &fnres);
|
||||
|
||||
/* Append "?query" to the file name. */
|
||||
u_query = u->query && *u->query ? u->query : NULL;
|
||||
if (u_query)
|
||||
/* Append "?query" to the file name, even if empty */
|
||||
if (u->query)
|
||||
{
|
||||
append_char (FN_QUERY_SEP, &fnres);
|
||||
append_uri_pathel (u_query, u_query + strlen (u_query),
|
||||
append_uri_pathel (u->query, u->query + strlen (u->query),
|
||||
true, &fnres);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user