[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5475: Archives with filenames with square brackets
From: |
Chong Yidong |
Subject: |
bug#5475: Archives with filenames with square brackets |
Date: |
Tue, 26 Jan 2010 16:05:20 -0500 |
> When a zip archive contains a file with square brackets in its name
> (e.g. "file[name].txt") then visiting this file displays an error:
>
> caution: filename not matched: file[name].txt
I assume this is a specific quirk of unzip that it handles square
brackets specially (characters like * seem to be handled literally).
How about this patch?
*** lisp/arc-mode.el 2010-01-13 08:35:10 +0000
--- lisp/arc-mode.el 2010-01-26 21:03:54 +0000
***************
*** 1782,1787 ****
--- 1782,1791 ----
(apply 'vector (nreverse files))))
(defun archive-zip-extract (archive name)
+ (when (string-match "[][]" name)
+ (require 'comint)
+ (let ((comint-file-name-quote-list '(?\] ?\[)))
+ (setq name (comint-quote-filename name))))
(if (equal (car archive-zip-extract) "pkzip")
(archive-*-extract archive name archive-zip-extract)
(archive-extract-by-stdout archive name archive-zip-extract)))
- bug#5475: Archives with filenames with square brackets, Juri Linkov, 2010/01/25
- bug#5475: Archives with filenames with square brackets,
Chong Yidong <=
- bug#5475: Archives with filenames with square brackets, Eli Zaretskii, 2010/01/26
- bug#5475: Archives with filenames with square brackets, Chong Yidong, 2010/01/27
- bug#5475: Archives with filenames with square brackets, Eli Zaretskii, 2010/01/27
- bug#5475: Archives with filenames with square brackets, Chong Yidong, 2010/01/28
- bug#5475: Archives with filenames with square brackets, Eli Zaretskii, 2010/01/28
- bug#5475: Archives with filenames with square brackets, Lennart Borgman, 2010/01/28
- bug#5475: Archives with filenames with square brackets, Eli Zaretskii, 2010/01/28
- bug#5475: Archives with filenames with square brackets, Juri Linkov, 2010/01/30
- bug#5475: Archives with filenames with square brackets, Eli Zaretskii, 2010/01/30
- bug#5475: Archives with filenames with square brackets, Juri Linkov, 2010/01/31