From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: unzip failure with files that contain colons
Date: Fri, 17 Jun 2022 01:44:40 +0900 [thread overview]
Message-ID: <20220617014440.695b55eaae270bb3b19f87c7@nifty.ne.jp> (raw)
In-Reply-To: <9093a683-0215-3835-42f5-a8f82975c29f@cs.umass.edu>
On Thu, 16 Jun 2022 11:50:23 -0400
Eliot Moss wrote:
> On 6/16/2022 11:29 AM, Takashi Yano wrote:
> > On Thu, 16 Jun 2022 06:22:38 +0200
> > Thomas Wolff wrote:
> >> Am 15.06.2022 um 20:30 schrieb Adam Dinwoodie:
> >>> Cygwin generally handles filenames with colons just fine, by mapping the
> >>> character to some higher Unicode character and remapping on the fly.
> >>> However Cygwin's `unzip` appears to have a bug: when unzipping an
> >>> archive that contains a filename with a colon, it replaces the colon
> >>> with an underscore.
> >>>
> >>> cygcheck.out and simple test script attached; expected behaviour from
> >>> running `bash unzip-bug.sh` is that you get an empty file called `a:b`,
> >>> but on Cygwin you instead get an empty file called `a_b`.
> >> It's an explicit #ifdef __CYGWIN__ in upstream unzip, file unix/unix.c,
> >> which transforms a bunch of characters.
> >> If I uncomment most of them (except \), all unpack fine:
> >> x0:z x1<z x2>z x3|z x4"z x5?z x6*z
> >
> > I have taken over the maintenance of unzip package, and
> > fix the problem in the updated unzip-6.0-18.
> > https://cygwin.com/pipermail/cygwin/2022-June/251653.html
>
> Is colon used for ADS under Windows? Could that be why one should
> be careful with it?
Cygwin replaces ':' (0x3A) in file name with U+F03A when creating
the file. See winsup/cygwin/path.cc and winsup/cygwin/strfuncs.cc.
Therefore, ':' can be safely used in file name without conflict.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
next prev parent reply other threads:[~2022-06-16 16:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 18:30 Adam Dinwoodie
2022-06-16 4:22 ` Thomas Wolff
2022-06-16 15:29 ` Takashi Yano
2022-06-16 15:50 ` Eliot Moss
2022-06-16 16:44 ` Takashi Yano [this message]
2022-06-18 20:23 ` Andrey Repin
2022-06-17 7:20 ` Adam Dinwoodie
[not found] ` <CAKwdsS-ZDR_ZFAkVwPci4mdcYcjONN_yoSb5sLxK678RRgfVmA@mail.gmail.com>
2022-06-18 23:40 ` unzip failure to recognize '--' Takashi Yano
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=20220617014440.695b55eaae270bb3b19f87c7@nifty.ne.jp \
--to=takashi.yano@nifty.ne.jp \
--cc=cygwin@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).