GNU bug report logs -
#67926
29.1; fail to extract ZIP subfile named with [...]
Previous Next
Reported by: awrhygty <at> outlook.com
Date: Wed, 20 Dec 2023 11:24:02 UTC
Severity: normal
Found in version 29.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 67926 <at> debbugs.gnu.org (full text, mbox):
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: awrhygty <at> outlook.com, 67926 <at> 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.
This bug report was last modified 1 year and 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.