From: Michael Albinus Date: Sun, 20 Apr 2014 21:35:55 +0000 (+0200) Subject: * net/tramp-sh.el (tramp-get-ls-command): Use "-b" argument if possible. X-Git-Tag: emacs-24.3.91~119 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=feb5d8a4d340ef247ec581141388f6ba6cfb0d73;p=emacs.git * net/tramp-sh.el (tramp-get-ls-command): Use "-b" argument if possible. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d762078dfd0..0b7de93cc02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-04-20 Michael Albinus + + * net/tramp-sh.el (tramp-get-ls-command): Use "-b" argument if + possible. + 2014-04-19 Stefan Monnier * progmodes/sh-script.el (sh-smie--sh-keyword-p): Handle variable diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 3b600e3d84e..0dd5b79be92 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4966,6 +4966,12 @@ Return ATTR." vec (format "%s --color=never -al /dev/null" result)) (setq result (concat result " --color=never"))) + ;; This should support file names with special + ;; characters. If this option is not supported, such + ;; file names might fail. + (when (tramp-send-command-and-check + vec (format "%s -b /dev/null" result)) + (setq result (concat result " -b"))) (throw 'ls-found result)) (setq dl (cdr dl)))))) (tramp-error vec 'file-error "Couldn't find a proper `ls' command"))))