Mercurial > emacs
changeset 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 | c2a34eaf2f6a |
children | f412ff4a9f03 074a7ce7d59b 75f6177a785f |
files | lisp/ChangeLog lisp/net/ange-ftp.el lisp/net/tramp-imap.el lisp/net/tramp-smb.el |
diffstat | 4 files changed, 23 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Feb 05 00:12:08 2010 -0800 +++ b/lisp/ChangeLog Fri Feb 05 12:15:28 2010 +0100 @@ -1,3 +1,10 @@ +2010-02-05 Michael Albinus <michael.albinus@gmx.de> + + * 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) + 2010-02-05 Glenn Morris <rgm@gnu.org> * progmodes/f90.el (f90-font-lock-keywords-2): Fix `enum'.
--- a/lisp/net/ange-ftp.el Fri Feb 05 00:12:08 2010 -0800 +++ b/lisp/net/ange-ftp.el Fri Feb 05 12:15:28 2010 +0100 @@ -4533,9 +4533,10 @@ (when (string-match "-?d\\'" switches) ;; Remove "d" which dired added to `switches'. (setq switches (substring switches 0 (match-beginning 0)))) + (setq file (directory-file-name file)) (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".") switches 'parse)) - (filename (file-name-nondirectory (directory-file-name file))) + (filename (file-name-nondirectory file)) (case-fold-search nil)) ;; FIXME: This presumes a particular output format, which is ;; basically Unix.
--- a/lisp/net/tramp-imap.el Fri Feb 05 00:12:08 2010 -0800 +++ b/lisp/net/tramp-imap.el Fri Feb 05 12:15:28 2010 +0100 @@ -395,9 +395,10 @@ (filename switches &optional wildcard full-directory-p) "Like `insert-directory' for Tramp files." (setq filename (expand-file-name filename)) - (when full-directory-p - ;; Called from `dired-add-entry'. - (setq filename (file-name-as-directory filename))) + (if full-directory-p + ;; Called from `dired-add-entry'. + (setq filename (file-name-as-directory filename)) + (setq filename (directory-file-name filename))) (with-parsed-tramp-file-name filename nil (save-match-data (let ((base (file-name-nondirectory localname)) @@ -479,7 +480,8 @@ (insert (format "%s\n" - (file-relative-name (expand-file-name (nth 0 x) filename)))) + (file-relative-name + (expand-file-name (nth 0 x) (file-name-directory filename))))) (put-text-property pos (1- (point)) 'dired-filename t)) (forward-line) (beginning-of-line)))
--- a/lisp/net/tramp-smb.el Fri Feb 05 00:12:08 2010 -0800 +++ b/lisp/net/tramp-smb.el Fri Feb 05 12:15:28 2010 +0100 @@ -651,9 +651,10 @@ (filename switches &optional wildcard full-directory-p) "Like `insert-directory' for Tramp files." (setq filename (expand-file-name filename)) - (when full-directory-p - ;; Called from `dired-add-entry'. - (setq filename (file-name-as-directory filename))) + (if full-directory-p + ;; Called from `dired-add-entry'. + (setq filename (file-name-as-directory filename)) + (setq filename (directory-file-name filename))) (with-parsed-tramp-file-name filename nil (save-match-data (let ((base (file-name-nondirectory filename)) @@ -715,8 +716,7 @@ (let ((attr (when (tramp-smb-get-stat-capability v) (ignore-errors - (file-attributes - (expand-file-name (nth 0 x) filename) 'string))))) + (file-attributes filename 'string))))) (insert (format "%10s %3d %-8s %-8s %8s %s " @@ -739,7 +739,9 @@ (insert (format "%s\n" - (file-relative-name (expand-file-name (nth 0 x) filename)))) + (file-relative-name + (expand-file-name + (nth 0 x) (file-name-directory filename))))) (put-text-property start (1- (point)) 'dired-filename t)) (forward-line) (beginning-of-line))))