diff options
| author | Michael Albinus | 2010-02-18 11:08:48 +0100 |
|---|---|---|
| committer | Michael Albinus | 2010-02-18 11:08:48 +0100 |
| commit | 73a37a6958c1cb93dafacc4c778567c239f2b171 (patch) | |
| tree | 644a6fccab0f49371aed7c519a29477ec9f1a271 | |
| parent | 6e4f5731f6620d147d4937ed2be2544720e01041 (diff) | |
| download | emacs-73a37a6958c1cb93dafacc4c778567c239f2b171.tar.gz emacs-73a37a6958c1cb93dafacc4c778567c239f2b171.zip | |
(tramp-handle-directory-files): When FULL, do not expand "." and "..".
Reported by Thierry Volpiatto <thierry.volpiatto@gmail.com>.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f531fcaec2..45117eb671f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2010-02-18 Michael Albinus <michael.albinus@gmx.de> | 1 | 2010-02-18 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 2 | ||
| 3 | * net/tramp.el (tramp-handle-directory-files): When FULL, do not | ||
| 4 | expand "." and "..". Reported by Thierry Volpiatto | ||
| 5 | <thierry.volpiatto@gmail.com>. | ||
| 6 | |||
| 7 | 2010-02-18 Michael Albinus <michael.albinus@gmx.de> | ||
| 8 | |||
| 3 | * net/tramp.el (tramp-handle-insert-file-contents): Set always the | 9 | * net/tramp.el (tramp-handle-insert-file-contents): Set always the |
| 4 | permissions of the temporary file to "0600". In case the remote | 10 | permissions of the temporary file to "0600". In case the remote |
| 5 | file has no read permissions for the owner, there might be | 11 | file has no read permissions for the owner, there might be |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index d15d245d01f..eed5a41e46d 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3142,7 +3142,7 @@ value of `default-file-modes', without execute permissions." | |||
| 3142 | "Like `directory-files' for Tramp files." | 3142 | "Like `directory-files' for Tramp files." |
| 3143 | ;; FILES-ONLY is valid for XEmacs only. | 3143 | ;; FILES-ONLY is valid for XEmacs only. |
| 3144 | (when (file-directory-p directory) | 3144 | (when (file-directory-p directory) |
| 3145 | (setq directory (expand-file-name directory)) | 3145 | (setq directory (file-name-as-directory (expand-file-name directory))) |
| 3146 | (let ((temp (nreverse (file-name-all-completions "" directory))) | 3146 | (let ((temp (nreverse (file-name-all-completions "" directory))) |
| 3147 | result item) | 3147 | result item) |
| 3148 | 3148 | ||
| @@ -3150,13 +3150,13 @@ value of `default-file-modes', without execute permissions." | |||
| 3150 | (setq item (directory-file-name (pop temp))) | 3150 | (setq item (directory-file-name (pop temp))) |
| 3151 | (when (and (or (null match) (string-match match item)) | 3151 | (when (and (or (null match) (string-match match item)) |
| 3152 | (or (null files-only) | 3152 | (or (null files-only) |
| 3153 | ;; files only | 3153 | ;; Files only. |
| 3154 | (and (equal files-only t) (file-regular-p item)) | 3154 | (and (equal files-only t) (file-regular-p item)) |
| 3155 | ;; directories only | 3155 | ;; Directories only. |
| 3156 | (file-directory-p item))) | 3156 | (file-directory-p item))) |
| 3157 | (push (if full (expand-file-name item directory) item) | 3157 | (push (if full (concat directory item) item) |
| 3158 | result))) | 3158 | result))) |
| 3159 | result))) | 3159 | (if nosort result (sort result 'string<))))) |
| 3160 | 3160 | ||
| 3161 | (defun tramp-handle-directory-files-and-attributes | 3161 | (defun tramp-handle-directory-files-and-attributes |
| 3162 | (directory &optional full match nosort id-format) | 3162 | (directory &optional full match nosort id-format) |