[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99527: (tramp-handle-directory-files
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99527: (tramp-handle-directory-files): When FULL, do not expand "." and "..". |
Date: |
Thu, 18 Feb 2010 11:08:48 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99527
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Thu 2010-02-18 11:08:48 +0100
message:
(tramp-handle-directory-files): When FULL, do not expand "." and "..".
Reported by Thierry Volpiatto <address@hidden>.
modified:
lisp/ChangeLog
lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-02-18 10:03:12 +0000
+++ b/lisp/ChangeLog 2010-02-18 10:08:48 +0000
@@ -1,5 +1,11 @@
2010-02-18 Michael Albinus <address@hidden>
+ * net/tramp.el (tramp-handle-directory-files): When FULL, do not
+ expand "." and "..". Reported by Thierry Volpiatto
+ <address@hidden>.
+
+2010-02-18 Michael Albinus <address@hidden>
+
* net/tramp.el (tramp-handle-insert-file-contents): Set always the
permissions of the temporary file to "0600". In case the remote
file has no read permissions for the owner, there might be
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2010-02-18 10:03:12 +0000
+++ b/lisp/net/tramp.el 2010-02-18 10:08:48 +0000
@@ -3142,7 +3142,7 @@
"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 @@
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99527: (tramp-handle-directory-files): When FULL, do not expand "." and "..".,
Michael Albinus <=