mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Use check_whether_file_exists() when encoding a file URI string
The file URI encoding is done in translate_url() immediately after the call to find_uri_protocol() [which also uses check_whether_file_exists()]. So it only makes sense to use check_whether_file_exists() also here since this is a potential ambiguous URL from the user. This fixes handling of files like 'a?b' given the command line, reported by rrowan. It broke (for the n-th time ;) in CVS version 1.317->1.318 back in August. The fix preserves the intend of that patch, namely the intend to optimize the number of calls to file_exists().
This commit is contained in:
parent
0c1e8a713d
commit
21f9b59130
@ -169,7 +169,7 @@ check_uri_file(unsigned char *name)
|
|||||||
static void
|
static void
|
||||||
encode_file_uri_string(struct string *string, unsigned char *uristring)
|
encode_file_uri_string(struct string *string, unsigned char *uristring)
|
||||||
{
|
{
|
||||||
int filenamelen = check_uri_file(uristring);
|
int filenamelen = check_whether_file_exists(uristring);
|
||||||
|
|
||||||
encode_uri_string(string, uristring, filenamelen, 0);
|
encode_uri_string(string, uristring, filenamelen, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user