Commit 73a37a69 authored by Michael Albinus's avatar Michael Albinus
Browse files

(tramp-handle-directory-files): When FULL, do not expand "." and "..".

Reported by Thierry Volpiatto <thierry.volpiatto@gmail.com>.
parent 6e4f5731
2010-02-18 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-handle-directory-files): When FULL, do not
expand "." and "..". Reported by Thierry Volpiatto
<thierry.volpiatto@gmail.com>.
2010-02-18 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-handle-insert-file-contents): Set always the
......
......@@ -3142,7 +3142,7 @@ value of `default-file-modes', without execute permissions."
"Like `directory-files' for Tramp files."
;; FILES-ONLY is valid for XEmacs only.
(when (file-directory-p directory)
(setq directory (expand-file-name directory))
(setq directory (file-name-as-directory (expand-file-name directory)))
(let ((temp (nreverse (file-name-all-completions "" directory)))
result item)
......@@ -3150,13 +3150,13 @@ value of `default-file-modes', without execute permissions."
(setq item (directory-file-name (pop temp)))
(when (and (or (null match) (string-match match item))
(or (null files-only)
;; files only
;; Files only.
(and (equal files-only t) (file-regular-p item))
;; directories only
;; Directories only.
(file-directory-p item)))
(push (if full (expand-file-name item directory) item)
(push (if full (concat directory item) item)
result)))
result)))
(if nosort result (sort result 'string<)))))
(defun tramp-handle-directory-files-and-attributes
(directory &optional full match nosort id-format)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment