From 8839c4a651216b4d0ad2c4aee635645cc7d6a56d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Dec 2001 02:50:51 +0000 Subject: [PATCH] (ange-ftp-insert-directory): Explicitly follow symlinks. --- lisp/ChangeLog | 1 + lisp/net/ange-ftp.el | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0a543e6491d..2d5b797cd97 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,7 @@ * net/ange-ftp.el (ange-ftp-allow-child-lookup): Always return nil. This fixes a bug that treated all files as directories. + (ange-ftp-insert-directory): Explicitly follow symlinks. * international/iso-transl.el (iso-transl-char-map) Eliminate the alias symbols--put the translated sequences here directly. diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 4700a114f32..eaf7319f41b 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -4380,13 +4380,19 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") (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) -- 2.39.2