aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2008-06-28 10:17:22 +0000
committerMichael Albinus2008-06-28 10:17:22 +0000
commit5da241082ecbe0992c0bf3a2021137d4b27a5e2a (patch)
tree5dcc88f3ca03493b7798f273b6336946cb6e73f3
parent2d8b5d77c1fa8e257b3d1b56a1d47e88d782a67a (diff)
downloademacs-5da241082ecbe0992c0bf3a2021137d4b27a5e2a.tar.gz
emacs-5da241082ecbe0992c0bf3a2021137d4b27a5e2a.zip
* net/tramp.el (tramp-handle-file-modes): Handle symlinks.
(tramp-convert-file-attributes): Convert symlinks only when returned from `tramp-handle-file-attributes-with-stat'.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/net/tramp.el14
2 files changed, 18 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7087c1a3606..30055bf16d5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12008-06-28 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-handle-file-modes): Handle symlinks.
4 (tramp-convert-file-attributes): Convert symlinks only when
5 returned from `tramp-handle-file-attributes-with-stat'.
6
7 * net/tramp-ftp.el (top): Delete 'ange-ftp property from
8 `substitute-in-file-name' when unloading.
9 (tramp-ftp-file-name-handler): Set `tramp-mode' to nil.
10
12008-06-28 Dan Nicolaescu <dann@ics.uci.edu> 112008-06-28 Dan Nicolaescu <dann@ics.uci.edu>
2 12
3 * vc-dir.el (vc-dir-hide-up-to-date): Also hide empty directories. 13 * vc-dir.el (vc-dir-hide-up-to-date): Also hide empty directories.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 6dd76abc610..5431290da52 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2675,9 +2675,9 @@ and gid of the corresponding user is taken. Both parameters must be integers."
2675 2675
2676(defun tramp-handle-file-modes (filename) 2676(defun tramp-handle-file-modes (filename)
2677 "Like `file-modes' for Tramp files." 2677 "Like `file-modes' for Tramp files."
2678 (when (file-exists-p filename) 2678 (let ((truename (or (file-truename filename) filename)))
2679 (tramp-mode-string-to-int 2679 (when (file-exists-p truename)
2680 (nth 8 (file-attributes filename))))) 2680 (tramp-mode-string-to-int (nth 8 (file-attributes truename))))))
2681 2681
2682(defun tramp-handle-file-directory-p (filename) 2682(defun tramp-handle-file-directory-p (filename)
2683 "Like `file-directory-p' for Tramp files." 2683 "Like `file-directory-p' for Tramp files."
@@ -6627,9 +6627,11 @@ Return ATTR."
6627 (unless (stringp (nth 8 attr)) 6627 (unless (stringp (nth 8 attr))
6628 (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr)))) 6628 (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr))))
6629 ;; Convert directory indication bit. 6629 ;; Convert directory indication bit.
6630 (if (string-match "^d" (nth 8 attr)) 6630 (when (string-match "^d" (nth 8 attr))
6631 (setcar attr t) 6631 (setcar attr t))
6632 (if (and (listp (car attr)) (stringp (caar attr)) 6632 ;; Convert symlink from `tramp-handle-file-attributes-with-stat'.
6633 (when (consp (car attr))
6634 (if (and (stringp (caar attr))
6633 (string-match ".+ -> .\\(.+\\)." (caar attr))) 6635 (string-match ".+ -> .\\(.+\\)." (caar attr)))
6634 (setcar attr (match-string 1 (caar attr))) 6636 (setcar attr (match-string 1 (caar attr)))
6635 (setcar attr nil))) 6637 (setcar attr nil)))