emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v


From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v
Date: Sat, 28 Jun 2008 10:16:38 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       08/06/28 10:16:38

Index: tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -b -r1.203 -r1.204
--- tramp.el    27 Jun 2008 02:13:36 -0000      1.203
+++ tramp.el    28 Jun 2008 10:16:37 -0000      1.204
@@ -2675,9 +2675,9 @@
 
 (defun tramp-handle-file-modes (filename)
   "Like `file-modes' for Tramp files."
-  (when (file-exists-p filename)
-    (tramp-mode-string-to-int
-     (nth 8 (file-attributes filename)))))
+  (let ((truename (or (file-truename filename) filename)))
+    (when (file-exists-p truename)
+      (tramp-mode-string-to-int (nth 8 (file-attributes truename))))))
 
 (defun tramp-handle-file-directory-p (filename)
   "Like `file-directory-p' for Tramp files."
@@ -6627,9 +6627,11 @@
   (unless (stringp (nth 8 attr))
     (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr))))
   ;; Convert directory indication bit.
-  (if (string-match "^d" (nth 8 attr))
-      (setcar attr t)
-    (if (and (listp (car attr)) (stringp (caar attr))
+  (when (string-match "^d" (nth 8 attr))
+    (setcar attr t))
+  ;; Convert symlink from `tramp-handle-file-attributes-with-stat'.
+  (when (consp (car attr))
+    (if (and (stringp (caar attr))
             (string-match ".+ -> .\\(.+\\)." (caar attr)))
        (setcar attr (match-string 1 (caar attr)))
       (setcar attr nil)))




reply via email to

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