[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 27443df: Quote file names in dired compression comm
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 27443df: Quote file names in dired compression commands |
Date: |
Sun, 30 Oct 2016 01:35:25 +0000 (UTC) |
branch: master
commit 27443df092bfb4ada559f8fc024e01f174a5bcb0
Author: José L. Doménech <address@hidden>
Commit: Noam Postavsky <address@hidden>
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).
---
lisp/dired-aux.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index d25352e..972b6b1 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1012,11 +1012,13 @@ and `dired-compress-files-alist'."
(t
(when (zerop
(dired-shell-command
- (replace-regexp-in-string
- "%o" out-file
- (replace-regexp-in-string
- "%i" (mapconcat #'file-name-nondirectory in-files " ")
- (cdr rule)))))
+ (format-spec (cdr rule)
+ `((?\o . ,(shell-quote-argument out-file))
+ (?\i . ,(mapconcat
+ (lambda (file-desc)
+ (shell-quote-argument
(file-name-nondirectory
+
file-desc)))
+ in-files " "))))))
(message "Compressed %d file(s) to %s"
(length in-files)
(file-name-nondirectory out-file)))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 27443df: Quote file names in dired compression commands,
Noam Postavsky <=