GNU bug report logs -
#24620
26.0.50; In dired: 'dired-do-compress-to' fails when filenames cotains space characters
Previous Next
Reported by: José L. Doménech <j_l_domenech <at> yahoo.com>
Date: Wed, 5 Oct 2016 07:07:02 UTC
Severity: minor
Tags: fixed, patch
Found in version 26.0.50
Fixed in version 26
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Thu, 27 Oct 2016 20:51:15 +0200,
Noam Postavsky wrote:
>
> Does passing non-nil for the LITERAL parameter to replace-regexp-in-string help?
>
Yes indeed!
So the patch becomes something like:
diff -u /usr/local/share/emacs/26.0.50/lisp/dired-aux.orig.el /usr/local/share/emacs/26.0.50/lisp/dired-aux.el
--- /usr/local/share/emacs/26.0.50/lisp/dired-aux.orig.el 2016-10-27 15:50:50.428634418 +0200
+++ /usr/local/share/emacs/26.0.50/lisp/dired-aux.el 2016-10-27 21:24:29.022566630 +0200
@@ -1013,10 +1013,13 @@
(when (zerop
(dired-shell-command
(replace-regexp-in-string
- "%o" out-file
+ "%o" (shell-quote-argument out-file)
(replace-regexp-in-string
- "%i" (mapconcat #'file-name-nondirectory in-files " ")
- (cdr rule)))))
+ "%i" (mapconcat (lambda (file-desc)
+ (shell-quote-argument
+ (file-name-nondirectory file-desc)))
+ in-files " ")
+ (cdr rule) nil t) nil t)))
(message "Compressed %d file(s) to %s"
(length in-files)
(file-name-nondirectory out-file)))))))
Diff finished. Thu Oct 27 21:24:43 2016
This bug report was last modified 8 years and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.