emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r116959: * net/tramp-sh.el (tramp-sh-handle-file-


From: Michael Albinus
Subject: [Emacs-diffs] emacs-24 r116959: * net/tramp-sh.el (tramp-sh-handle-file-truename): Revert previous
Date: Sun, 13 Apr 2014 10:31:59 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116959
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: emacs-24
timestamp: Sun 2014-04-13 12:31:48 +0200
message:
  * 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)
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/tramp-sh.el           trampsh.el-20100913133439-a1faifh29eqoi4nh-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-04-13 10:27:32 +0000
+++ b/lisp/ChangeLog    2014-04-13 10:31:48 +0000
@@ -1,3 +1,9 @@
+2014-04-13  Michael Albinus  <address@hidden>
+
+       * 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  <address@hidden>
 
        * elec-pair.el (electric-pair--syntax-ppss): Simplify and fix

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2014-04-11 12:59:36 +0000
+++ b/lisp/net/tramp-sh.el      2014-04-13 10:31:48 +0000
@@ -950,15 +950,15 @@
          (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]