From: Michael Albinus Date: Sun, 13 Apr 2014 10:31:48 +0000 (+0200) Subject: * net/tramp-sh.el (tramp-sh-handle-file-truename): Revert previous X-Git-Tag: emacs-24.3.91~149 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f2d164a4c6f3f0eb6f175b57012738aeaad2f294;p=emacs.git * net/tramp-sh.el (tramp-sh-handle-file-truename): Revert previous patch, there are new problems with file names containing spaces. Get rid of backticks. (Bug#17238) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f08a133d98..6099f31d636 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-04-13 Michael Albinus + + * net/tramp-sh.el (tramp-sh-handle-file-truename): Revert previous + patch, there are new problems with file names containing spaces. + Get rid of backticks. (Bug#17238) + 2014-04-13 João Távora * elec-pair.el (electric-pair--syntax-ppss): Simplify and fix diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 4d0b5ae54d4..3b600e3d84e 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -950,15 +950,15 @@ target of the symlink differ." (tramp-message v 4 "Finding true name for `%s'" filename) (cond ;; Use GNU readlink --canonicalize-missing where available. - ;; We must quote the file name twice due to the backticks. ((tramp-get-remote-readlink v) - (setq result - (tramp-send-command-and-read - v - (format "echo \"\\\"`%s --canonicalize-missing %s`\\\"\"" - (tramp-get-remote-readlink v) - (tramp-shell-quote-argument - (tramp-shell-quote-argument localname)))))) + (tramp-send-command-and-check + v + (format "%s --canonicalize-missing %s" + (tramp-get-remote-readlink v) + (tramp-shell-quote-argument localname))) + (with-current-buffer (tramp-get-connection-buffer v) + (goto-char (point-min)) + (setq result (buffer-substring (point-min) (point-at-eol))))) ;; Use Perl implementation. ((and (tramp-get-remote-perl v)