Michael Albinus <[EMAIL PROTECTED]> writes:

> For me, everything is fine now except the case of a symlink to a
> symlink to a directory on a remote host, which should be a rare case.

With the patch below (instead of the one I've posted last night) even
this works now for me:

home/albinus> diff -u ange-ftp.el.orig ange-ftp.el
--- ange-ftp.el.orig    Fri Apr  4 23:32:20 2003
+++ ange-ftp.el Sat Apr  5 15:02:57 2003
@@ -3356,9 +3356,14 @@
       (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,8 @@
             (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)

> Kai: could you, please, verify this, and commit the ange-ftp patch to
> CVS if you agree?

Best regards, Michael.



_______________________________________________
Tramp-devel mailing list
[EMAIL PROTECTED]
http://mail.nongnu.org/mailman/listinfo/tramp-devel

Reply via email to