emacs-pretest-bug
[Top][All Lists]
Advanced

[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: Sat, 05 Jul 2003 18:24:42 -0400

    I've finally got around to being able to test this, however, this
    function seems incomplete.

Yes, I see the end got lost.  Here's the whole thing.

(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.
        (file-error nil))
    (ange-ftp-real-file-symlink-p file)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]