[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105883: * net/tramp-sh.el (tramp-sh-
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105883: * net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): Fix |
Date: |
Fri, 23 Sep 2011 11:38:41 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105883
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Fri 2011-09-23 11:38:41 +0200
message:
* net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): Fix
nasty bug using wrong cached values.
modified:
lisp/ChangeLog
lisp/net/tramp-sh.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-09-23 09:24:47 +0000
+++ b/lisp/ChangeLog 2011-09-23 09:38:41 +0000
@@ -1,3 +1,8 @@
+2011-09-23 Michael Albinus <address@hidden>
+
+ * net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): Fix
+ nasty bug using wrong cached values.
+
2011-09-23 Alan Mackenzie <address@hidden>
* progmodes/cc-defs.el (c-version): Increase to 5.31.9.
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2011-09-19 06:53:45 +0000
+++ b/lisp/net/tramp-sh.el 2011-09-23 09:38:41 +0000
@@ -1738,7 +1738,9 @@
"file-name-all-completions"
nil)))
(when cache-hit (list cache-hit))))
- (tramp-compat-number-sequence (length filename) 0 -1)))))
+ ;; We cannot use a length of 0, because file properties
+ ;; for "foo" and "foo/" are identical.
+ (tramp-compat-number-sequence (length filename) 1 -1)))))
;; Cache expired or no matching cache entry found so we need
;; to perform a remote operation.
@@ -1803,12 +1805,12 @@
(with-current-buffer (tramp-get-buffer v)
(goto-char (point-max))
- ;; Check result code, found in last line of output
+ ;; Check result code, found in last line of output.
(forward-line -1)
(if (looking-at "^fail$")
(progn
;; Grab error message from line before last line
- ;; (it was put there by `cd 2>&1')
+ ;; (it was put there by `cd 2>&1').
(forward-line -1)
(tramp-error
v 'file-error
@@ -1829,9 +1831,8 @@
(push (buffer-substring (point) (point-at-eol)) result)))
;; Because the remote op went through OK we know the
- ;; directory we `cd'-ed to exists
- (tramp-set-file-property
- v localname "file-exists-p" t)
+ ;; directory we `cd'-ed to exists.
+ (tramp-set-file-property v localname "file-exists-p" t)
;; Because the remote op went through OK we know every
;; file listed by `ls' exists.
@@ -1840,11 +1841,10 @@
v (concat localname entry) "file-exists-p" t))
result)
- ;; Store result in the cache
+ ;; Store result in the cache.
(tramp-set-file-property
v (concat localname filename)
- "file-name-all-completions"
- result))))))))
+ "file-name-all-completions" result))))))))
;; cp, mv and ln
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105883: * net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): Fix,
Michael Albinus <=