[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106186: * net/tramp-sh.el (tramp-sh-
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106186: * net/tramp-sh.el (tramp-sh-handle-file-directory-p): Return t for |
Date: |
Tue, 25 Oct 2011 14:50:03 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106186
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Tue 2011-10-25 14:50:03 +0200
message:
* net/tramp-sh.el (tramp-sh-handle-file-directory-p): Return t for
filenames "/method:foo:".
modified:
lisp/ChangeLog
lisp/net/tramp-sh.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-10-25 02:19:17 +0000
+++ b/lisp/ChangeLog 2011-10-25 12:50:03 +0000
@@ -1,3 +1,8 @@
+2011-10-25 Michael Albinus <address@hidden>
+
+ * net/tramp-sh.el (tramp-sh-handle-file-directory-p): Return t for
+ filenames "/method:foo:".
+
2011-10-25 Stefan Monnier <address@hidden>
* comint.el (comint-get-old-input-default): Fix use-prompt-regexp case
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2011-09-23 09:38:41 +0000
+++ b/lisp/net/tramp-sh.el 2011-10-25 12:50:03 +0000
@@ -1594,17 +1594,14 @@
(defun tramp-sh-handle-file-directory-p (filename)
"Like `file-directory-p' for Tramp files."
- ;; Care must be taken that this function returns `t' for symlinks
- ;; pointing to directories. Surely the most obvious implementation
- ;; would be `test -d', but that returns false for such symlinks.
- ;; CCC: Stefan Monnier says that `test -d' follows symlinks. And
- ;; I now think he's right. So we could be using `test -d', couldn't
- ;; we?
- ;;
- ;; Alternatives: `cd %s', `test -d %s'
(with-parsed-tramp-file-name filename nil
- (with-file-property v localname "file-directory-p"
- (tramp-run-test "-d" filename))))
+ ;; `file-directory-p' is used as predicate for filename completion.
+ ;; Sometimes, when a connection is not established yet, it is
+ ;; desirable to return t immediately for "/method:foo:". It can
+ ;; be expected that this is always a directory.
+ (or (zerop (length localname))
+ (with-file-property v localname "file-directory-p"
+ (tramp-run-test "-d" filename)))))
(defun tramp-sh-handle-file-writable-p (filename)
"Like `file-writable-p' for Tramp files."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106186: * net/tramp-sh.el (tramp-sh-handle-file-directory-p): Return t for,
Michael Albinus <=