]> git.eshelyaron.com Git - emacs.git/commitdiff
From Michael Albinus <Michael.Albinus@alcatel.de>.
authorKai Großjohann <kgrossjo@eu.uu.net>
Sun, 13 Apr 2003 12:46:11 +0000 (12:46 +0000)
committerKai Großjohann <kgrossjo@eu.uu.net>
Sun, 13 Apr 2003 12:46:11 +0000 (12:46 +0000)
(ange-ftp-expand-symlink): If result of
expansion is a symlink, expand again.
(ange-ftp-file-symlink-p): Return target of symlink literally.

lisp/ChangeLog
lisp/net/ange-ftp.el

index 55563864e85c6f77ddd61b3959204bb0fb0998b1..0b77e1d148d28dbaa71996616c9cf7a6866aeadf 100644 (file)
@@ -1,3 +1,10 @@
+2003-04-13  Kai Gro\e,A_\e(Bjohann  <kai.grossjohann@gmx.net>
+       From Michael Albinus <Michael.Albinus@alcatel.de>.
+
+       * net/ange-ftp.el (ange-ftp-expand-symlink): If result of
+       expansion is a symlink, expand again.
+       (ange-ftp-file-symlink-p): Return target of symlink literally.
+
 2003-04-13  Masatake YAMATO  <jet@gyve.org>
 
        * bindings.el (toplevel): Don't change the face
index 58ffe0b27d5bb8ac44bc09f27ee3f08482415a33..ca5cb193bde023c0647b88efb2225c734084bf14 100644 (file)
@@ -3356,9 +3356,14 @@ system TYPE.")
       (ange-ftp-real-insert-file-contents filename visit beg end replace))))
 
 (defun ange-ftp-expand-symlink (file dir)
-  (if (file-name-absolute-p file)
-      (ange-ftp-replace-name-component dir file)
-    (expand-file-name file dir)))
+  (let ((res (if (file-name-absolute-p file)
+                (ange-ftp-replace-name-component dir file)
+              (expand-file-name file dir))))
+    (if (file-symlink-p res)
+       (ange-ftp-expand-symlink
+        (ange-ftp-get-file-entry res)
+        (file-name-directory (directory-file-name res)))
+      res)))
 
 (defun ange-ftp-file-symlink-p (file)
   ;; call ange-ftp-expand-file-name rather than the normal
@@ -3370,11 +3375,7 @@ system TYPE.")
             (gethash
              (ange-ftp-get-file-part file)
              (ange-ftp-get-files (file-name-directory file)))))
-       (if (stringp file-ent)
-           (if (file-name-absolute-p file-ent)
-               (ange-ftp-replace-name-component
-                (file-name-directory file) file-ent)
-             file-ent)))
+       (and (stringp file-ent) file-ent))
     (ange-ftp-real-file-symlink-p file)))
 
 (defun ange-ftp-file-exists-p (name)