On Friday, September 16, 2016 11:39:15 AM CEST Eli Zaretskii wrote: > > From: Tim Ruehsen <tim.rueh...@gmx.de> > > Date: Fri, 16 Sep 2016 10:15:17 +0200 > > Cc: firstname.lastname@example.org > > > > > *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 '!'.
That is what I meant with 'Wget has functions to percent escape special characters...'. It is not only colons. And it depends on the OS (and/or file system). From https://en.wikipedia.org/wiki/Comparison_of_file_systems: "MS-DOS, Microsoft Windows, and OS/2 disallow the characters \ / : ? * " > < | and NUL in file and directory names across all filesystems. Unices and Linux disallow the characters / and NUL in file and directory names across all filesystems." Regards, Tim
Description: This is a digitally signed message part.