aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2014-02-24 16:48:32 +0100
committerMichael Albinus2014-02-24 16:48:32 +0100
commitc848881f79911704f71d40f02dcd0ecdcfcc98ef (patch)
treecfb5315b097b7d32e9c7ed735790beea9bc1da2c
parent0e38ae052eb194ac509b77ba9be4b0ab70c784f4 (diff)
downloademacs-c848881f79911704f71d40f02dcd0ecdcfcc98ef.tar.gz
emacs-c848881f79911704f71d40f02dcd0ecdcfcc98ef.zip
* net/tramp-sh.el (tramp-sh-handle-file-truename): Improve last fix.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/net/tramp-sh.el13
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index da0d2ea4499..c946ab6e12b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12014-02-24 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-sh.el (tramp-sh-handle-file-truename): Improve last fix.
4
12014-02-24 Nicolas Richard <theonewiththeevillook@yahoo.fr> 52014-02-24 Nicolas Richard <theonewiththeevillook@yahoo.fr>
2 6
3 * minibuffer.el (completion--try-word-completion): 7 * minibuffer.el (completion--try-word-completion):
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index efad151dac8..37e212970ce 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -938,8 +938,11 @@ target of the symlink differ."
938 938
939(defun tramp-sh-handle-file-truename (filename) 939(defun tramp-sh-handle-file-truename (filename)
940 "Like `file-truename' for Tramp files." 940 "Like `file-truename' for Tramp files."
941 (with-parsed-tramp-file-name (expand-file-name filename) nil 941 (format
942 (tramp-make-tramp-file-name method user host 942 "%s%s"
943 (with-parsed-tramp-file-name (expand-file-name filename) nil
944 (tramp-make-tramp-file-name
945 method user host
943 (with-tramp-file-property v localname "file-truename" 946 (with-tramp-file-property v localname "file-truename"
944 (let ((result nil)) ; result steps in reverse order 947 (let ((result nil)) ; result steps in reverse order
945 (tramp-message v 4 "Finding true name for `%s'" filename) 948 (tramp-message v 4 "Finding true name for `%s'" filename)
@@ -1042,8 +1045,10 @@ target of the symlink differ."
1042 (setq result (concat result "/")))))) 1045 (setq result (concat result "/"))))))
1043 1046
1044 (tramp-message v 4 "True name of `%s' is `%s'" localname result) 1047 (tramp-message v 4 "True name of `%s' is `%s'" localname result)
1045 (if (string-equal (file-name-nondirectory localname) "") 1048 result))))
1046 (file-name-as-directory result) result)))))) 1049
1050 ;; Preserve trailing "/".
1051 (if (string-equal (file-name-nondirectory filename) "") "/" "")))
1047 1052
1048;; Basic functions. 1053;; Basic functions.
1049 1054