# HG changeset patch # User Richard M. Stallman # Date 1057611338 0 # Node ID 2a6ed9e210b218eb823ad34d6b8735c35e27c77c # Parent 04564d8f3be951d1a268dd34bed7cea4e16f6336 (ange-ftp-file-symlink-p): Use condition-case to catch error in ange-ftp-get-files. diff -r 04564d8f3be9 -r 2a6ed9e210b2 lisp/net/ange-ftp.el --- a/lisp/net/ange-ftp.el Mon Jul 07 20:54:56 2003 +0000 +++ b/lisp/net/ange-ftp.el Mon Jul 07 20:55:38 2003 +0000 @@ -3371,11 +3371,17 @@ ;; redefines both file-symlink-p and expand-file-name. (setq file (ange-ftp-expand-file-name file)) (if (ange-ftp-ftp-name file) - (let ((file-ent - (gethash - (ange-ftp-get-file-part file) - (ange-ftp-get-files (file-name-directory file))))) - (and (stringp file-ent) file-ent)) + (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. + (file-error nil)) (ange-ftp-real-file-symlink-p file))) (defun ange-ftp-file-exists-p (name)