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).
This commit is contained in:
parent
966b73b316
commit
27443df092
1 changed files with 7 additions and 5 deletions
|
@ -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)))))))
|
||||
|
|
Loading…
Add table
Reference in a new issue