+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
(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
(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)