* net/tramp-sh.el (tramp-sh-handle-file-truename): Quote the file
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 11 Apr 2014 12:59:36 +0000 (14:59 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 11 Apr 2014 12:59:36 +0000 (14:59 +0200)
name twice due to backticks.  (Bug#17238)

lisp/ChangeLog
lisp/net/tramp-sh.el

index 9a9d422..2c5b40e 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-11  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-sh-handle-file-truename): Quote the file
+       name twice due to backticks.  (Bug#17238)
+
 2014-04-11  Glenn Morris  <rgm@gnu.org>
 
        * term/w32-win.el (x-win-suspend-error):
index 8ff29a8..4d0b5ae 100644 (file)
@@ -950,13 +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 localname)))))
+                          (tramp-shell-quote-argument
+                           (tramp-shell-quote-argument localname))))))
 
           ;; Use Perl implementation.
           ((and (tramp-get-remote-perl v)