[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ange-ftp errors out for some directories
From: |
Richard Stallman |
Subject: |
Re: ange-ftp errors out for some directories |
Date: |
Wed, 25 Jun 2003 15:52:35 -0400 |
Does this replacement function give good results?
(defun ange-ftp-file-symlink-p (file)
;; call ange-ftp-expand-file-name rather than the normal
;; expand-file-name to stop loops when using a package that
;; redefines both file-symlink-p and expand-file-name.
(setq file (ange-ftp-expand-file-name file))
(if (ange-ftp-ftp-name file)
(condition-case nil
(let ((file-ent
(gethash
(ange-ftp-get-file-part file)
(ange-ftp-get-files (file-name-directory file)))))
(and (stringp file-ent) file-ent))
;; If we can't read the parent directory, just assume
;; this file is not a symlink.
;; This makes it possible to access a directory that
;; whose parent is not readable.