From 3a6d465d94fc630f3d0ac15aa167eb10fe75cfd6 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 7 Jan 2006 19:16:51 +0100 Subject: [PATCH] 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(). --- src/protocol/uri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol/uri.c b/src/protocol/uri.c index 833da11e..897e4b8e 100644 --- a/src/protocol/uri.c +++ b/src/protocol/uri.c @@ -169,7 +169,7 @@ check_uri_file(unsigned char *name) static void 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); } -- 2.11.4.GIT