changeset 42397:47ec068f97d5

(ange-ftp-insert-directory): Explicitly follow symlinks.
author Richard M. Stallman <rms@gnu.org>
date Sat, 29 Dec 2001 02:50:34 +0000
parents f8555eb1fe49
children a1745c808765
files lisp/net/ange-ftp.el
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/ange-ftp.el	Sat Dec 29 01:13:26 2001 +0000
+++ b/lisp/net/ange-ftp.el	Sat Dec 29 02:50:34 2001 +0000
@@ -4380,13 +4380,19 @@
 
 (defun ange-ftp-insert-directory (file switches &optional wildcard full)
   (let ((short (ange-ftp-abbreviate-filename file))
-	(parsed (ange-ftp-ftp-name (expand-file-name file))))
+	(parsed (ange-ftp-ftp-name (expand-file-name file)))
+	tem)
     (if parsed
-	(insert
-	 (if wildcard
-	     (let ((default-directory (file-name-directory file)))
-	       (ange-ftp-ls (file-name-nondirectory file) switches nil nil t))
-	   (ange-ftp-ls file switches full)))
+	(if (and (not wildcard)
+		 (setq tem (file-symlink-p (directory-file-name file))))
+	    (ange-ftp-insert-directory
+	     (ange-ftp-replace-name-component file tem)
+	     switches wildcard full)
+	  (insert
+	   (if wildcard
+	       (let ((default-directory (file-name-directory file)))
+		 (ange-ftp-ls (file-name-nondirectory file) switches nil nil t))
+	     (ange-ftp-ls file switches full))))q
       (ange-ftp-real-insert-directory file switches wildcard full))))
 
 (defun ange-ftp-dired-uncache (dir)