diff options
| author | José L. Doménech | 2016-10-29 21:18:31 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2016-10-29 21:32:11 -0400 |
| commit | 27443df092bfb4ada559f8fc024e01f174a5bcb0 (patch) | |
| tree | 265c70d278d6ac6d898a2ef502ad235a1fe711ef | |
| parent | 966b73b3163416adf09bcff7418ecc9fa5a554c9 (diff) | |
| download | emacs-27443df092bfb4ada559f8fc024e01f174a5bcb0.tar.gz emacs-27443df092bfb4ada559f8fc024e01f174a5bcb0.zip | |
Quote file names in dired compression commands
* lisp/dired-aux.el (dired-do-compress-to): Change the string
used as shell command for compression by quoting the filenames
used for input and output (Bug #24620).
| -rw-r--r-- | lisp/dired-aux.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index d25352ec5bc..972b6b1ade0 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -1012,11 +1012,13 @@ and `dired-compress-files-alist'." | |||
| 1012 | (t | 1012 | (t |
| 1013 | (when (zerop | 1013 | (when (zerop |
| 1014 | (dired-shell-command | 1014 | (dired-shell-command |
| 1015 | (replace-regexp-in-string | 1015 | (format-spec (cdr rule) |
| 1016 | "%o" out-file | 1016 | `((?\o . ,(shell-quote-argument out-file)) |
| 1017 | (replace-regexp-in-string | 1017 | (?\i . ,(mapconcat |
| 1018 | "%i" (mapconcat #'file-name-nondirectory in-files " ") | 1018 | (lambda (file-desc) |
| 1019 | (cdr rule))))) | 1019 | (shell-quote-argument (file-name-nondirectory |
| 1020 | file-desc))) | ||
| 1021 | in-files " ")))))) | ||
| 1020 | (message "Compressed %d file(s) to %s" | 1022 | (message "Compressed %d file(s) to %s" |
| 1021 | (length in-files) | 1023 | (length in-files) |
| 1022 | (file-name-nondirectory out-file))))))) | 1024 | (file-name-nondirectory out-file))))))) |