summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dired.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index ca005785d67..c502dd8a509 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1228,6 +1228,11 @@ see `dired-use-ls-dired' for more details.")
(let ((dir-wildcard (insert-directory-wildcard-in-dir-p dir)))
(cond (dir-wildcard
(setq switches (concat "-d " switches))
+ ;; We don't know whether the remote ls supports
+ ;; "--dired", so we cannot add it to the `process-file'
+ ;; call for wildcards.
+ (when (file-remote-p dir)
+ (setq switches (dired-replace-in-string "--dired" "" switches)))
(let ((default-directory (car dir-wildcard))
(script (format "ls %s %s" switches (cdr dir-wildcard))))
(unless