Mercurial > emacs
comparison lisp/net/ange-ftp.el @ 107092:2e763e444bc2
* net/ange-ftp.el (ange-ftp-insert-directory):
* net/tramp-imap.el (tramp-imap-handle-insert-directory):
* net/tramp-smb.el (tramp-smb-handle-insert-directory):
Handle also directories. (Bug#5478)
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Fri, 05 Feb 2010 12:15:28 +0100 |
parents | 59d8f3cc91f4 |
children | 541b767fb366 |
comparison
equal
deleted
inserted
replaced
107091:c2a34eaf2f6a | 107092:2e763e444bc2 |
---|---|
4531 ;; want to ls a file. So instead, we get a full listing of the | 4531 ;; want to ls a file. So instead, we get a full listing of the |
4532 ;; parent directory and extract the line corresponding to `file'. | 4532 ;; parent directory and extract the line corresponding to `file'. |
4533 (when (string-match "-?d\\'" switches) | 4533 (when (string-match "-?d\\'" switches) |
4534 ;; Remove "d" which dired added to `switches'. | 4534 ;; Remove "d" which dired added to `switches'. |
4535 (setq switches (substring switches 0 (match-beginning 0)))) | 4535 (setq switches (substring switches 0 (match-beginning 0)))) |
4536 (setq file (directory-file-name file)) | |
4536 (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".") | 4537 (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".") |
4537 switches 'parse)) | 4538 switches 'parse)) |
4538 (filename (file-name-nondirectory (directory-file-name file))) | 4539 (filename (file-name-nondirectory file)) |
4539 (case-fold-search nil)) | 4540 (case-fold-search nil)) |
4540 ;; FIXME: This presumes a particular output format, which is | 4541 ;; FIXME: This presumes a particular output format, which is |
4541 ;; basically Unix. | 4542 ;; basically Unix. |
4542 (if (string-match (concat "^.+[^ ] " (regexp-quote filename) | 4543 (if (string-match (concat "^.+[^ ] " (regexp-quote filename) |
4543 "\\( -> .*\\)?[@/*=]?\n") dirlist) | 4544 "\\( -> .*\\)?[@/*=]?\n") dirlist) |