Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
65790:2eea5cbe306f | 65791:5121212db622 |
---|---|
4505 (when (string-match "d\\'" switches) | 4505 (when (string-match "d\\'" switches) |
4506 ;; Remove "d" which dired added to `switches'. | 4506 ;; Remove "d" which dired added to `switches'. |
4507 (setq switches (substring switches 0 (match-beginning 0)))) | 4507 (setq switches (substring switches 0 (match-beginning 0)))) |
4508 (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".") | 4508 (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".") |
4509 switches nil)) | 4509 switches nil)) |
4510 (filename (file-name-nondirectory (directory-file-name file))) | |
4510 (case-fold-search nil)) | 4511 (case-fold-search nil)) |
4511 ;; FIXME: This presumes a particular output format, which is | 4512 ;; FIXME: This presumes a particular output format, which is |
4512 ;; basically Unix. | 4513 ;; basically Unix. |
4513 (if (string-match (concat "^.+[^ ] " (regexp-quote file) | 4514 (if (string-match (concat "^.+[^ ] " (regexp-quote filename) |
4514 "\\( -> .*\\)?[@/*=]?\n") dirlist) | 4515 "\\( -> .*\\)?[@/*=]?\n") dirlist) |
4515 (match-string 0 dirlist) | 4516 (match-string 0 dirlist) |
4516 ""))))))) | 4517 ""))))))) |
4517 | 4518 |
4518 (defun ange-ftp-dired-uncache (dir) | 4519 (defun ange-ftp-dired-uncache (dir) |