Fix dired switch (that contain quotes and spaces) parsing

* lisp/files.el (insert-directory): Tokenize shell strings
correctly (bug#18875).
This commit is contained in:
Lars Ingebrigtsen 2021-08-19 16:21:07 +02:00
parent a44432a773
commit 04f723dec9

View file

@ -7463,7 +7463,7 @@ normally equivalent short `-D' option is just passed on to
(unless (equal switches "")
;; Split the switches at any spaces so we can
;; pass separate options as separate args.
(split-string-and-unquote switches)))
(split-string-shell-command switches)))
;; Avoid lossage if FILE starts with `-'.
'("--")
(list file))))))