Mercurial > emacs
diff lisp/net/ange-ftp.el @ 65791:5121212db622
(ange-ftp-insert-directory): Fix up the search when `file' is absolute.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 02 Oct 2005 15:54:03 +0000 |
parents | 2eea5cbe306f |
children | 0534e10b621e |
line wrap: on
line diff
--- a/lisp/net/ange-ftp.el Sun Oct 02 15:38:20 2005 +0000 +++ b/lisp/net/ange-ftp.el Sun Oct 02 15:54:03 2005 +0000 @@ -4507,10 +4507,11 @@ (setq switches (substring switches 0 (match-beginning 0)))) (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".") switches nil)) + (filename (file-name-nondirectory (directory-file-name file))) (case-fold-search nil)) ;; FIXME: This presumes a particular output format, which is ;; basically Unix. - (if (string-match (concat "^.+[^ ] " (regexp-quote file) + (if (string-match (concat "^.+[^ ] " (regexp-quote filename) "\\( -> .*\\)?[@/*=]?\n") dirlist) (match-string 0 dirlist) "")))))))