[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 164fcc6: Fix Bug#27315
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 164fcc6: Fix Bug#27315 |
Date: |
Wed, 14 Jun 2017 08:17:31 -0400 (EDT) |
branch: master
commit 164fcc6f26e4a539f6cb1e4b7196ce5f93d06a53
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Fix Bug#27315
* lisp/net/tramp-cache.el (tramp-cache-read-persistent-data):
New defvar.
(top): Use it.
* lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
Check for connected, not for connectable. (Bug#27315)
(tramp-process-actions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Use `tramp-cache-read-persistent-data'.
* test/lisp/net/tramp-tests.el (top): Set also
`tramp-cache-read-persistent-data'.
---
lisp/net/tramp-cache.el | 12 +++++++-----
lisp/net/tramp-gvfs.el | 8 ++++----
lisp/net/tramp.el | 9 ++++-----
test/lisp/net/tramp-tests.el | 1 +
4 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 415cde2..ac5a9c4 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -429,14 +429,16 @@ for all methods. Resulting data are derived from
connection history."
tramp-cache-data)
res))
+;; When "emacs -Q" has been called, both variables are nil. We do not
+;; load the persistency file then, in order to have a clean test environment.
+;;;###tramp-autoload
+(defvar tramp-cache-read-persistent-data (or init-file-user site-run-file)
+ "Whether to read persistent data at startup time.")
+
;; Read persistent connection history.
(when (and (stringp tramp-persistency-file-name)
(zerop (hash-table-count tramp-cache-data))
- ;; When "emacs -Q" has been called, both variables are nil.
- ;; We do not load the persistency file then, in order to
- ;; have a clean test environment.
- (or init-file-user
- site-run-file))
+ tramp-cache-read-persistent-data)
(condition-case err
(with-temp-buffer
(insert-file-contents tramp-persistency-file-name)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 859809c..4c750df 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1669,10 +1669,10 @@ connection if a previous connection has died for some
reason."
(format "Opening connection for address@hidden using %s" user host
method))
;; Enable `auth-source'.
- (tramp-set-connection-property vec "first-password-request" t)
+ (tramp-set-connection-property
+ vec "first-password-request" tramp-cache-read-persistent-data)
- ;; There will be a callback of "askPassword" when a password is
- ;; needed.
+ ;; There will be a callback of "askPassword" when a password is needed.
(dbus-register-method
:session dbus-service-emacs object-path
tramp-gvfs-interface-mountoperation "askPassword"
@@ -1693,7 +1693,7 @@ connection if a previous connection has died for some
reason."
'tramp-gvfs-handler-askquestion)
;; The call must be asynchronously, because of the "askPassword"
- ;; or "askQuestion"callbacks.
+ ;; or "askQuestion" callbacks.
(if (string-match "(so)$" tramp-gvfs-mountlocation-signature)
(with-tramp-dbus-call-method vec nil
:session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 5bedc38..e329f92 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2876,11 +2876,10 @@ User is always nil."
(tramp-get-method-parameter v 'tramp-case-insensitive)
;; There isn't. So we must check, in case there's a connection already.
- (and (tramp-connectable-p filename)
+ (and (file-remote-p filename nil 'connected)
(with-tramp-connection-property v "case-insensitive"
(ignore-errors
(with-tramp-progress-reporter v 5 "Checking case-insensitive"
- (tramp-backtrace v)
;; The idea is to compare a file with lower case
;; letters with the same file with upper case letters.
(let ((candidate
@@ -3551,14 +3550,14 @@ The terminal type can be configured with
`tramp-terminal-type'."
PROC and VEC indicate the remote connection to be used. POS, if
set, is the starting point of the region to be deleted in the
connection buffer."
- ;; Enable `auth-source'. We must use `tramp-current-*' variables in
- ;; case we have several hops.
+ ;; Enable `auth-source', unless "emacs -Q" has been called. We must
+ ;; use `tramp-current-*' variables in case we have several hops.
(tramp-set-connection-property
(make-tramp-file-name
:method tramp-current-method :user tramp-current-user
:domain tramp-current-domain :host tramp-current-host
:port tramp-current-port)
- "first-password-request" t)
+ "first-password-request" tramp-cache-read-persistent-data)
(save-restriction
(with-tramp-progress-reporter
proc 3 "Waiting for prompts from remote shell"
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 28147c4..3c1e76e 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -75,6 +75,7 @@
(setq password-cache-expiry nil
tramp-verbose 0
+ tramp-cache-read-persistent-data t ;; For auth-sources.
tramp-copy-size-limit nil
tramp-message-show-message nil
tramp-persistency-file-name nil)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 164fcc6: Fix Bug#27315,
Michael Albinus <=