From: Kai Großjohann Date: Sun, 13 Apr 2003 12:46:11 +0000 (+0000) Subject: From Michael Albinus . X-Git-Tag: ttn-vms-21-2-B4~10523 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=64cf24550f3cfaf9c3ae692156b60676c00607d5;p=emacs.git From Michael Albinus . (ange-ftp-expand-symlink): If result of expansion is a symlink, expand again. (ange-ftp-file-symlink-p): Return target of symlink literally. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 55563864e85..0b77e1d148d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-04-13 Kai Gro,A_(Bjohann + From Michael Albinus . + + * 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 * bindings.el (toplevel): Don't change the face diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 58ffe0b27d5..ca5cb193bde 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -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)