[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 67a0149: Make dired-do-compress understand files wi
From: |
Oleh Krehel |
Subject: |
[Emacs-diffs] master 67a0149: Make dired-do-compress understand files with spaces in them |
Date: |
Mon, 29 Aug 2016 08:36:58 +0000 (UTC) |
branch: master
commit 67a01490934ba5a43b68b7141b20bc8e636ed7c5
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Make dired-do-compress understand files with spaces in them
* lisp/dired-aux.el (dired-compress-file): Add `shell-quote-argument'
and `literal' flag to `replace-regexp-in-string'.
---
lisp/dired-aux.el | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 4bdded3..9e0943a 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1049,10 +1049,12 @@ Return nil if no change in files."
(prog1 (setq newname (file-name-as-directory newname))
(dired-shell-command
(replace-regexp-in-string
- "%o" newname
+ "%o" (shell-quote-argument newname)
(replace-regexp-in-string
- "%i" file
- command))))
+ "%i" (shell-quote-argument file)
+ command
+ nil t)
+ nil t)))
;; We found an uncompression rule.
(when (not
(dired-check-process
@@ -1072,10 +1074,12 @@ Return nil if no change in files."
(default-directory (file-name-directory file)))
(dired-shell-command
(replace-regexp-in-string
- "%o" out-name
+ "%o" (shell-quote-argument out-name)
(replace-regexp-in-string
- "%i" (file-name-nondirectory file)
- (cadr suffix))))
+ "%i" (shell-quote-argument (file-name-nondirectory
file))
+ (cadr suffix)
+ nil t)
+ nil t))
out-name)))
(let ((out-name (concat file ".gz")))
(and (or (not (file-exists-p out-name))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 67a0149: Make dired-do-compress understand files with spaces in them,
Oleh Krehel <=