bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Meta


From: Eli Zaretskii
Subject: Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml
Date: Fri, 16 Sep 2016 11:39:15 +0300

> From: Tim Ruehsen <address@hidden>
> Date: Fri, 16 Sep 2016 10:15:17 +0200
> Cc: address@hidden
> 
> >   *name          +  ref           -> result
> >   -----------------------------------------
> >   NULL           + "foo/C:D:file" -> "file"             [bare basename]
> >   "foobar"       + "foo/C:D:file" -> "file"             [bare basename]
> >   "dir/old"      + "foo/C:D:file" -> "dir/C:D:file"
> >   "C:D:file/old" + "foo/E:F:new"  -> "C:D:file/E:F:new" [is this ok?]
> 
> Just make sure that no file name beginning with letter+colon is used for 
> system 
> calls on Windows (e.g. open("C:D:file/E:F:new", ...) is not a good idea). 
> Either you strip the 'C:D:', or percent escape ':' on Windows. Wget has 
> functions to percent escape special characters in file names, depending on 
> the 
> OS it is built on.

(I've lost track of this discussion, and don't understand the context
well enough to get back on track, so please bear with me.)

Windows filesystems will not allow file names that have embedded colon
characters, except if that colon is part of the drive specification at
the beginning of a file name, as in "D:/dir/file".  File names like
the 2 last results above are not allowed, and cannot be created or
opened.

So if wget needs to create or open such files, it needs to replace the
colon with some other character, like '!'.

Again, apologies if this comment makes no sense in the context of
whatever you've been discussing.



reply via email to

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