[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: |
Tim Ruehsen |
Subject: |
Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml |
Date: |
Fri, 16 Sep 2016 11:15:31 +0200 |
User-agent: |
KMail/5.2.3 (Linux/4.7.0-1-amd64; KDE/5.25.0; x86_64; ; ) |
On Friday, September 16, 2016 11:39:15 AM CEST Eli Zaretskii wrote:
> > 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 '!'.
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
signature.asc
Description: This is a digitally signed message part.
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, (continued)
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Giuseppe Scrivano, 2016/09/11
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Matthew White, 2016/09/14
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Giuseppe Scrivano, 2016/09/14
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Matthew White, 2016/09/14
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Giuseppe Scrivano, 2016/09/15
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Matthew White, 2016/09/15
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Tim Ruehsen, 2016/09/15
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Matthew White, 2016/09/15
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Tim Ruehsen, 2016/09/16
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Eli Zaretskii, 2016/09/16
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml,
Tim Ruehsen <=
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Eli Zaretskii, 2016/09/16
- Re: [Bug-wget] [PATCH 20/25] New option --metalink-index to process Metalink application/metalink4+xml, Matthew White, 2016/09/16