Use check_whether_file_exists() when encoding a file URI string
commit21f9b5913022904d7c11f78ffa1a5b6e70fe3371
authorJonas Fonseca <fonseca@diku.dk>
Sat, 7 Jan 2006 18:16:51 +0000 (7 19:16 +0100)
committerJonas Fonseca <fonseca@antimatter.localdomain>
Sat, 7 Jan 2006 18:16:51 +0000 (7 19:16 +0100)
treef33618c46787e9178cf4344f472a62e66a7548fd
parent0c1e8a713d3c3cd7d8fd10c07414da990e99efe5
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