bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Bug-wget] wget-1.12.1-devel: 'Unsupported scheme' and windows pathn


From: Ray Satiro
Subject: RE: [Bug-wget] wget-1.12.1-devel: 'Unsupported scheme' and windows pathnames
Date: Sun, 13 Dec 2009 11:34:52 -0800 (PST)

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 <address@hidden> wrote:

From: Tony Lewis <address@hidden>
Subject: RE: [Bug-wget] wget-1.12.1-devel: 'Unsupported scheme' and windows 
pathnames
To: "'Ray Satiro'" <address@hidden>, "'Steven Schubiger'" <address@hidden>
Cc: address@hidden
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

[Prev in Thread] Current Thread [Next in Thread]