From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-apps@cygwin.com
Subject: Re: setup and colons in filenames
Date: Wed, 25 Oct 2017 21:00:00 -0000 [thread overview]
Message-ID: <20171025210035.GA7980@calimero.vinschen.de> (raw)
In-Reply-To: <4317ea35-5b64-1485-c970-210eac051a0f@dronecode.org.uk>
[-- Attachment #1: Type: text/plain, Size: 2519 bytes --]
On Oct 25 21:36, Jon Turney wrote:
> On 25/10/2017 21:16, Corinna Vinschen wrote:
> > On Oct 25 20:23, Jon Turney wrote:
> > > On 25/10/2017 16:50, Ken Brown wrote:
> > > > This is a followup to the thread started here:
> > > >
> > > > https://cygwin.com/ml/cygwin-patches/2017-q4/msg00012.html
> > > >
> > > > Currently setup's parse_filename is not correctly parsing filenames in
> > > > /etc/setup/installed.db that contain colons, as explained in the above
> > > > thread. It would be easy to fix this by just ripping out the 'base'
> > > > function, except for the fact that parse_filename is called by
> > > > ScanFindVisitor::visitFile.
> > >
> > > Since older setup cannot correctly parse an installed.db containing
> > > filenames like that, we should probably bump the installed.db version at the
> > > same time as fixing this.
> > >
> > > > I don't know enough about WIN32_FIND_DATA to know whether the call to
> > > > 'base' is needed for that use of parse_filename. If so, is it safe to
> > > > skip all colons in that setting, since we're dealing with Win32
> > > > filenames and they don't see the colons in Cygwin filenames?
> > >
> > > Yeah, that's about as far as I got before giving up...
> > >
> > > > Do we need two versions of parse_filename, one that calls base and one
> > > > that doesn't?
> > >
> > > This might be the easiest solution :)
> > >
> > > The other concern I had was if the filenames for the package archives stored
> > > in the download cache end up containing a ':', which I thought wasn't
> > > allowed in windows filenames?
> >
> > Colons in Cygwin filenames will have 0xf03a value in WIN32. The code to
> > transpose special chars into the private use area at 0xf0XY is in setup,
> > but I'm not sure if setup is really working correctly with archives
> > containing a colon.
> I think the package archives are stored using native Windows filenames, not
> cygwin filenames (i.e. file:// paths rather than cygfile:// paths), because
> the "Local Package Directory" is not necessarily under the cygwin root, so
> I'm not sure that transformation applies.
The transposition is handled in mklongpath, which is called in nt_fopen,
or called manually in other callers of nt_wfopen to construct the long
path. In theory, this should cover all bases...
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-10-25 21:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 15:50 Ken Brown
2017-10-25 19:23 ` Jon Turney
2017-10-25 20:16 ` Corinna Vinschen
2017-10-25 20:36 ` Jon Turney
2017-10-25 21:00 ` Corinna Vinschen [this message]
2017-10-26 16:14 ` Jon Turney
2017-10-26 16:14 ` Jon Turney
2017-10-26 17:04 ` Ken Brown
2017-10-26 17:20 ` Jon Turney
2017-10-26 17:42 ` Achim Gratz
2017-10-26 17:49 ` Jon Turney
2017-10-26 18:25 ` Achim Gratz
2017-10-27 8:47 ` Corinna Vinschen
2017-10-27 10:40 ` Achim Gratz
2017-10-27 13:44 ` Jon Turney
2017-10-27 15:20 ` Ken Brown
2017-10-27 16:28 ` Corinna Vinschen
2017-10-27 13:43 ` Jon Turney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171025210035.GA7980@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).