diff options
Diffstat (limited to 'lisp/net/tramp-cache.el')
| -rw-r--r-- | lisp/net/tramp-cache.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 03a5fe5b88e..d222dd1011d 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el | |||
| @@ -243,7 +243,7 @@ PROPERTY is set persistent when KEY is a vector." | |||
| 243 | (aset key 3 nil)) | 243 | (aset key 3 nil)) |
| 244 | (let ((hash (or (gethash key tramp-cache-data) | 244 | (let ((hash (or (gethash key tramp-cache-data) |
| 245 | (puthash key (make-hash-table :test 'equal) | 245 | (puthash key (make-hash-table :test 'equal) |
| 246 | tramp-cache-data)))) | 246 | tramp-cache-data)))) |
| 247 | (puthash property value hash) | 247 | (puthash property value hash) |
| 248 | (setq tramp-cache-data-changed t) | 248 | (setq tramp-cache-data-changed t) |
| 249 | (tramp-message key 7 "%s %s" property value) | 249 | (tramp-message key 7 "%s %s" property value) |
| @@ -329,10 +329,15 @@ KEY identifies the connection, it is either a process or a vector." | |||
| 329 | tramp-cache-data-changed | 329 | tramp-cache-data-changed |
| 330 | (stringp tramp-persistency-file-name)) | 330 | (stringp tramp-persistency-file-name)) |
| 331 | (let ((cache (copy-hash-table tramp-cache-data))) | 331 | (let ((cache (copy-hash-table tramp-cache-data))) |
| 332 | ;; Remove temporary data. | 332 | ;; Remove temporary data. If there is the key "login-as", we |
| 333 | ;; don't save either, because all other properties might | ||
| 334 | ;; depend on the login name, and we want to give the | ||
| 335 | ;; possibility to use another login name later on. | ||
| 333 | (maphash | 336 | (maphash |
| 334 | (lambda (key value) | 337 | (lambda (key value) |
| 335 | (if (and (vectorp key) (not (tramp-file-name-localname key))) | 338 | (if (and (vectorp key) |
| 339 | (not (tramp-file-name-localname key)) | ||
| 340 | (not (gethash "login-as" value))) | ||
| 336 | (progn | 341 | (progn |
| 337 | (remhash "process-name" value) | 342 | (remhash "process-name" value) |
| 338 | (remhash "process-buffer" value) | 343 | (remhash "process-buffer" value) |