Hi Tony, thanks for your reply.

The most recent proposed patch I submitted is for url_has_scheme() not 
retrieve_from_file(). The changes I made to url_has_scheme() would cause it to 
return false (no scheme) if the possible scheme is only a single letter.

The check for a possible scheme would be stricter -- and just as before If no
possible scheme is found retrieve_from_file() will assume a file. I don't see 
what's wrong with this.

I've never seen anything like the example you give. However I have seen the 
format C://abc/def/ghi.txt. What's the disadvantage to returning false if the 
scheme is only a single letter? I don't know of any scheme that is only a 
single letter.

Regardless of whether or not wget maintainers decide to apply my patch, please 
remember that strstr(p, "//" ); can return p if *p == NULL.

Thanks,

Jay


--- On Sun, 12/13/09, Tony Lewis <[email protected]> wrote:

From: Tony Lewis <[email protected]>
Subject: RE: [Bug-wget] wget-1.12.1-devel: 'Unsupported scheme' and windows 
pathnames
To: "'Ray Satiro'" <[email protected]>, "'Steven Schubiger'" 
<[email protected]>
Cc: [email protected]
Date: Sunday, December 13, 2009, 4:59 AM

Ray Satiro wrote:

> On windows this is valid:
> C:\Users\Internet\Desktop>if exist c://file.txt echo hi
> hi

On windows this is valid too:
if exist c://////////////file.txt echo hi
hi

but neither is the canonical way of expressing the location of a file in the
root directory of the C drive.

Why would you want to modify retrieve_from_file() to recognize broken ways
of expressing a path? 






      

Reply via email to