diff options
| author | Richard M. Stallman | 2003-07-07 20:55:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-07-07 20:55:38 +0000 |
| commit | 34301ace3d23760e4a9fddfaf53f386faa375029 (patch) | |
| tree | 5b3874f4b56465ee1f2830c6b8a9e4aaa998966d | |
| parent | 654805e39d5ea62a3dba5b516655cb6a412110ed (diff) | |
| download | emacs-34301ace3d23760e4a9fddfaf53f386faa375029.tar.gz emacs-34301ace3d23760e4a9fddfaf53f386faa375029.zip | |
(ange-ftp-file-symlink-p):
Use condition-case to catch error in ange-ftp-get-files.
| -rw-r--r-- | lisp/net/ange-ftp.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index ca5cb193bde..a315482fd1e 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -3371,11 +3371,17 @@ system TYPE.") | |||
| 3371 | ;; redefines both file-symlink-p and expand-file-name. | 3371 | ;; redefines both file-symlink-p and expand-file-name. |
| 3372 | (setq file (ange-ftp-expand-file-name file)) | 3372 | (setq file (ange-ftp-expand-file-name file)) |
| 3373 | (if (ange-ftp-ftp-name file) | 3373 | (if (ange-ftp-ftp-name file) |
| 3374 | (let ((file-ent | 3374 | (condition-case nil |
| 3375 | (gethash | 3375 | (let ((file-ent |
| 3376 | (ange-ftp-get-file-part file) | 3376 | (gethash |
| 3377 | (ange-ftp-get-files (file-name-directory file))))) | 3377 | (ange-ftp-get-file-part file) |
| 3378 | (and (stringp file-ent) file-ent)) | 3378 | (ange-ftp-get-files (file-name-directory file))))) |
| 3379 | (and (stringp file-ent) file-ent)) | ||
| 3380 | ;; If we can't read the parent directory, just assume | ||
| 3381 | ;; this file is not a symlink. | ||
| 3382 | ;; This makes it possible to access a directory that | ||
| 3383 | ;; whose parent is not readable. | ||
| 3384 | (file-error nil)) | ||
| 3379 | (ange-ftp-real-file-symlink-p file))) | 3385 | (ange-ftp-real-file-symlink-p file))) |
| 3380 | 3386 | ||
| 3381 | (defun ange-ftp-file-exists-p (name) | 3387 | (defun ange-ftp-file-exists-p (name) |