* net/tramp-sh.el (tramp-sh-handle-file-truename): Improve last fix.

This commit is contained in:
Michael Albinus 2014-02-24 16:48:32 +01:00
parent 0e38ae052e
commit c848881f79
2 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,7 @@
2014-02-24 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-sh-handle-file-truename): Improve last fix.
2014-02-24 Nicolas Richard <theonewiththeevillook@yahoo.fr>
* minibuffer.el (completion--try-word-completion):

View file

@ -938,8 +938,11 @@ target of the symlink differ."
(defun tramp-sh-handle-file-truename (filename)
"Like `file-truename' for Tramp files."
(with-parsed-tramp-file-name (expand-file-name filename) nil
(tramp-make-tramp-file-name method user host
(format
"%s%s"
(with-parsed-tramp-file-name (expand-file-name filename) nil
(tramp-make-tramp-file-name
method user host
(with-tramp-file-property v localname "file-truename"
(let ((result nil)) ; result steps in reverse order
(tramp-message v 4 "Finding true name for `%s'" filename)
@ -1042,8 +1045,10 @@ target of the symlink differ."
(setq result (concat result "/"))))))
(tramp-message v 4 "True name of `%s' is `%s'" localname result)
(if (string-equal (file-name-nondirectory localname) "")
(file-name-as-directory result) result))))))
result))))
;; Preserve trailing "/".
(if (string-equal (file-name-nondirectory filename) "") "/" "")))
;; Basic functions.