public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: unzip failure to recognize '--'
Date: Sun, 19 Jun 2022 08:40:11 +0900	[thread overview]
Message-ID: <20220619084011.16198091b4c0f611ff4de541@nifty.ne.jp> (raw)
In-Reply-To: <CAKwdsS-ZDR_ZFAkVwPci4mdcYcjONN_yoSb5sLxK678RRgfVmA@mail.gmail.com>

On Sat, 18 Jun 2022 15:08:35 -0700
Backwoods BC wrote:
> I'm tacking 'unzip' this issue on here since it seems appropriate:
> Unzip does not recognize the standard '--' flag to tell it to stop
> looking for flags.
> 
> I was processing some files that started with '--' and I ended up
> having to use 'cygpath' to expand them to absolute paths so that unzip
> wouldn't complain.

As you already recognized, Info-zip utility does not support '--'
flag. This is not a bug but by design. It can easily treats the
file name beginning with '-' as follows.

touch -- -d -x
zip ./--abc.zip ./-d ./-x
rm -- -d -x
unzip ./--abc.zip '\-d'


-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

      parent reply	other threads:[~2022-06-18 23:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15 18:30 unzip failure with files that contain colons 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
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       ` Takashi Yano [this message]

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=20220619084011.16198091b4c0f611ff4de541@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).