/[emacs]/emacs/lisp/net/ange-ftp.el
ViewVC logotype

Diff of /emacs/lisp/net/ange-ftp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.58 by kai, Sat Jun 26 14:40:51 2004 UTC revision 1.59 by dak, Sat Aug 21 21:50:06 2004 UTC
# Line 1014  or nil meaning don't change it." Line 1014  or nil meaning don't change it."
1014    
1015  (defun ange-ftp-hash-entry-exists-p (key tbl)  (defun ange-ftp-hash-entry-exists-p (key tbl)
1016    "Return whether there is an association for KEY in TABLE."    "Return whether there is an association for KEY in TABLE."
1017    (not (eq (gethash key tbl 'unknown) 'unknown)))    (and tbl (not (eq (gethash key tbl 'unknown) 'unknown))))
1018    
1019  (defun ange-ftp-hash-table-keys (tbl)  (defun ange-ftp-hash-table-keys (tbl)
1020    "Return a sorted list of all the active keys in TABLE, as strings."    "Return a sorted list of all the active keys in TABLE, as strings."
# Line 2919  NO-ERROR, if a listing for DIRECTORY can Line 2919  NO-ERROR, if a listing for DIRECTORY can
2919                 ;; error message.                 ;; error message.
2920                 (gethash "." ent))                 (gethash "." ent))
2921            ;; Child lookup failed, so try the parent.            ;; Child lookup failed, so try the parent.
2922            (let ((table (ange-ftp-get-files dir 'no-error)))            (ange-ftp-hash-entry-exists-p
2923              ;; If the dir doesn't exist, don't use it as a hash table.             file (ange-ftp-get-files dir 'no-error))))))
             (and table  
                  (ange-ftp-hash-entry-exists-p file  
                                                table)))))))  
2924    
2925  (defun ange-ftp-get-file-entry (name)  (defun ange-ftp-get-file-entry (name)
2926    "Given NAME, return the given file entry.    "Given NAME, return the given file entry.
# Line 3374  system TYPE.") Line 3371  system TYPE.")
3371    (setq file (ange-ftp-expand-file-name file))    (setq file (ange-ftp-expand-file-name file))
3372    (if (ange-ftp-ftp-name file)    (if (ange-ftp-ftp-name file)
3373        (condition-case nil        (condition-case nil
3374            (let ((file-ent            (let ((ent (ange-ftp-get-files (file-name-directory file))))
3375                   (gethash              (and ent
3376                    (ange-ftp-get-file-part file)                   (stringp (setq ent
3377                    (ange-ftp-get-files (file-name-directory file)))))                                  (gethash (ange-ftp-get-file-part file) ent)))
3378              (and (stringp file-ent) file-ent))                   ent))
3379          ;; If we can't read the parent directory, just assume          ;; If we can't read the parent directory, just assume
3380          ;; this file is not a symlink.          ;; this file is not a symlink.
3381          ;; This makes it possible to access a directory that          ;; This makes it possible to access a directory that

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26