emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116547: * net/tramp-sh.el (tramp-sh-handle-file-tru


From: Michael Albinus
Subject: [Emacs-diffs] trunk r116547: * net/tramp-sh.el (tramp-sh-handle-file-truename): Improve last fix.
Date: Mon, 24 Feb 2014 15:48:39 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116547
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2014-02-24 16:48:32 +0100
message:
  * net/tramp-sh.el (tramp-sh-handle-file-truename): Improve last fix.
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-02-24 15:41:46 +0000
+++ b/lisp/ChangeLog    2014-02-24 15:48:32 +0000
@@ -1,3 +1,7 @@
+2014-02-24  Michael Albinus  <address@hidden>
+
+       * net/tramp-sh.el (tramp-sh-handle-file-truename): Improve last fix.
+
 2014-02-24  Nicolas Richard  <address@hidden>
 
        * minibuffer.el (completion--try-word-completion):

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2014-02-23 14:51:29 +0000
+++ b/lisp/net/tramp-sh.el      2014-02-24 15:48:32 +0000
@@ -938,8 +938,11 @@
 
 (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 @@
                  (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.
 


reply via email to

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