bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67926: 29.1; fail to extract ZIP subfile named with [...]


From: Eli Zaretskii
Subject: bug#67926: 29.1; fail to extract ZIP subfile named with [...]
Date: Sat, 23 Dec 2023 13:58:54 +0200

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: awrhygty@outlook.com,  67926@debbugs.gnu.org
> Date: Sat, 23 Dec 2023 12:47:31 +0100
> 
> On Dez 23 2023, Eli Zaretskii wrote:
> 
> > Is there any way of making 'unzip' extract file[abc].txt by name,  by
> > some kind of escaping or protecting the [...] wildcard from expansion?
> 
> $ unzip foo a\[bc\].txt
> Archive:  foo.zip
> caution: filename not matched:  a[bc].txt
> $ unzip foo 'a\[bc\].txt'
> Archive:  foo.zip
>  extracting: a[bc].txt               

Thanks, but this doesn't seem to work on Windows, likely because unzip
converts backslashes into forward slashes (or something), and because
quoting 'like this' is not supported on Windows:

  D:\usr\eli>unzip wild.zip 'file\[abc\].txt'
  Archive:  wild.zip
  caution: filename not matched:  'file/[abc/].txt'

  D:\usr\eli>unzip wild.zip "file\[abc\].txt"
  Archive:  wild.zip
  caution: filename not matched:  file/[abc/].txt

  D:\usr\eli>unzip wild.zip "file\\[abc\\].txt"
  Archive:  wild.zip
  caution: filename not matched:  file//[abc//].txt

The OP's report was specifically about Windows.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]