diff options
| author | Michael Albinus | 2017-06-14 14:17:22 +0200 |
|---|---|---|
| committer | Michael Albinus | 2017-06-14 14:17:22 +0200 |
| commit | 164fcc6f26e4a539f6cb1e4b7196ce5f93d06a53 (patch) | |
| tree | 23b08f4be044bea2a34d69743bab1e2fc81ad90a /lisp | |
| parent | 5647c4a2c62054ad3dae3d6d83739b7cc4d10c9f (diff) | |
| download | emacs-164fcc6f26e4a539f6cb1e4b7196ce5f93d06a53.tar.gz emacs-164fcc6f26e4a539f6cb1e4b7196ce5f93d06a53.zip | |
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'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/net/tramp-cache.el | 12 | ||||
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 8 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 9 |
3 files changed, 15 insertions, 14 deletions
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 415cde2fc8a..ac5a9c45bbd 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." | |||
| 429 | tramp-cache-data) | 429 | tramp-cache-data) |
| 430 | res)) | 430 | res)) |
| 431 | 431 | ||
| 432 | ;; When "emacs -Q" has been called, both variables are nil. We do not | ||
| 433 | ;; load the persistency file then, in order to have a clean test environment. | ||
| 434 | ;;;###tramp-autoload | ||
| 435 | (defvar tramp-cache-read-persistent-data (or init-file-user site-run-file) | ||
| 436 | "Whether to read persistent data at startup time.") | ||
| 437 | |||
| 432 | ;; Read persistent connection history. | 438 | ;; Read persistent connection history. |
| 433 | (when (and (stringp tramp-persistency-file-name) | 439 | (when (and (stringp tramp-persistency-file-name) |
| 434 | (zerop (hash-table-count tramp-cache-data)) | 440 | (zerop (hash-table-count tramp-cache-data)) |
| 435 | ;; When "emacs -Q" has been called, both variables are nil. | 441 | tramp-cache-read-persistent-data) |
| 436 | ;; We do not load the persistency file then, in order to | ||
| 437 | ;; have a clean test environment. | ||
| 438 | (or init-file-user | ||
| 439 | site-run-file)) | ||
| 440 | (condition-case err | 442 | (condition-case err |
| 441 | (with-temp-buffer | 443 | (with-temp-buffer |
| 442 | (insert-file-contents tramp-persistency-file-name) | 444 | (insert-file-contents tramp-persistency-file-name) |
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 859809c00a8..4c750df3c40 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." | |||
| 1669 | (format "Opening connection for %s@%s using %s" user host method)) | 1669 | (format "Opening connection for %s@%s using %s" user host method)) |
| 1670 | 1670 | ||
| 1671 | ;; Enable `auth-source'. | 1671 | ;; Enable `auth-source'. |
| 1672 | (tramp-set-connection-property vec "first-password-request" t) | 1672 | (tramp-set-connection-property |
| 1673 | vec "first-password-request" tramp-cache-read-persistent-data) | ||
| 1673 | 1674 | ||
| 1674 | ;; There will be a callback of "askPassword" when a password is | 1675 | ;; There will be a callback of "askPassword" when a password is needed. |
| 1675 | ;; needed. | ||
| 1676 | (dbus-register-method | 1676 | (dbus-register-method |
| 1677 | :session dbus-service-emacs object-path | 1677 | :session dbus-service-emacs object-path |
| 1678 | tramp-gvfs-interface-mountoperation "askPassword" | 1678 | tramp-gvfs-interface-mountoperation "askPassword" |
| @@ -1693,7 +1693,7 @@ connection if a previous connection has died for some reason." | |||
| 1693 | 'tramp-gvfs-handler-askquestion) | 1693 | 'tramp-gvfs-handler-askquestion) |
| 1694 | 1694 | ||
| 1695 | ;; The call must be asynchronously, because of the "askPassword" | 1695 | ;; The call must be asynchronously, because of the "askPassword" |
| 1696 | ;; or "askQuestion"callbacks. | 1696 | ;; or "askQuestion" callbacks. |
| 1697 | (if (string-match "(so)$" tramp-gvfs-mountlocation-signature) | 1697 | (if (string-match "(so)$" tramp-gvfs-mountlocation-signature) |
| 1698 | (with-tramp-dbus-call-method vec nil | 1698 | (with-tramp-dbus-call-method vec nil |
| 1699 | :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker | 1699 | :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5bedc383d86..e329f921e03 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -2876,11 +2876,10 @@ User is always nil." | |||
| 2876 | (tramp-get-method-parameter v 'tramp-case-insensitive) | 2876 | (tramp-get-method-parameter v 'tramp-case-insensitive) |
| 2877 | 2877 | ||
| 2878 | ;; There isn't. So we must check, in case there's a connection already. | 2878 | ;; There isn't. So we must check, in case there's a connection already. |
| 2879 | (and (tramp-connectable-p filename) | 2879 | (and (file-remote-p filename nil 'connected) |
| 2880 | (with-tramp-connection-property v "case-insensitive" | 2880 | (with-tramp-connection-property v "case-insensitive" |
| 2881 | (ignore-errors | 2881 | (ignore-errors |
| 2882 | (with-tramp-progress-reporter v 5 "Checking case-insensitive" | 2882 | (with-tramp-progress-reporter v 5 "Checking case-insensitive" |
| 2883 | (tramp-backtrace v) | ||
| 2884 | ;; The idea is to compare a file with lower case | 2883 | ;; The idea is to compare a file with lower case |
| 2885 | ;; letters with the same file with upper case letters. | 2884 | ;; letters with the same file with upper case letters. |
| 2886 | (let ((candidate | 2885 | (let ((candidate |
| @@ -3551,14 +3550,14 @@ The terminal type can be configured with `tramp-terminal-type'." | |||
| 3551 | PROC and VEC indicate the remote connection to be used. POS, if | 3550 | PROC and VEC indicate the remote connection to be used. POS, if |
| 3552 | set, is the starting point of the region to be deleted in the | 3551 | set, is the starting point of the region to be deleted in the |
| 3553 | connection buffer." | 3552 | connection buffer." |
| 3554 | ;; Enable `auth-source'. We must use `tramp-current-*' variables in | 3553 | ;; Enable `auth-source', unless "emacs -Q" has been called. We must |
| 3555 | ;; case we have several hops. | 3554 | ;; use `tramp-current-*' variables in case we have several hops. |
| 3556 | (tramp-set-connection-property | 3555 | (tramp-set-connection-property |
| 3557 | (make-tramp-file-name | 3556 | (make-tramp-file-name |
| 3558 | :method tramp-current-method :user tramp-current-user | 3557 | :method tramp-current-method :user tramp-current-user |
| 3559 | :domain tramp-current-domain :host tramp-current-host | 3558 | :domain tramp-current-domain :host tramp-current-host |
| 3560 | :port tramp-current-port) | 3559 | :port tramp-current-port) |
| 3561 | "first-password-request" t) | 3560 | "first-password-request" tramp-cache-read-persistent-data) |
| 3562 | (save-restriction | 3561 | (save-restriction |
| 3563 | (with-tramp-progress-reporter | 3562 | (with-tramp-progress-reporter |
| 3564 | proc 3 "Waiting for prompts from remote shell" | 3563 | proc 3 "Waiting for prompts from remote shell" |