Subject: bug#5475: Archives with filenames with square brackets

From: Chong Yidong <[email-masked]>
Date: Wed, 27 Jan 2010 11:57:46 -0500

Eli Zaretskii <[email-masked]> writes:

> First, why not use shell-quote-argument, instead of requiring comint?

I wasn't sure whether it was only [] that was handled specially, or the
usual shell wildcards.  But I see now that it is the latter, as you say.
So shell-quote-argument is indeed the correct thing.

> Second, could someone please see if pkzip also expands wildcards
> internally?  If it does not, the quoting will need to be done only in
> the non-pkzip branch.  We also need to test this on MS-Windows.

I have no way to check this.  Looks like pkzip is Windows-only.

> But most importantly, this patch is not clean, IMO: it hardcodes into
> archive-zip-extract (the function) some knowledge of what can be the
> possible values of archive-zip-extract the defcustom.  What if
> tomorrow there will be a 3rd possibility, in addition to pkzip and
> unzip?
>
> That is why I thought about some less trivial patch: add to the data
> structures that are values of these defcustom's a flag to indicate
> whether the file name needs to be quoted or not.

Well, archive-zip-extract already branches for pkzip/unzip, so whatever
uncleanliness that's associated with is already present...