diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2021-05-23 12:34:36 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2021-05-23 12:34:36 +0200 |
commit | fc87cdf95986667bf083fdab01df20a6a07d5d0f (patch) | |
tree | 544e21f185b11a09789029171490dc3053dff37a /lisp/net/tramp-archive.el | |
parent | c60d707f2cc62b4cbe7f9c29d6ff9c2ae0277f9b (diff) | |
download | emacs-fc87cdf95986667bf083fdab01df20a6a07d5d0f.tar.gz emacs-fc87cdf95986667bf083fdab01df20a6a07d5d0f.tar.bz2 emacs-fc87cdf95986667bf083fdab01df20a6a07d5d0f.zip |
Adapt tramp-archive-autoload-file-name-handler
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-handler):
Bind `default-directory' to safe value.
Diffstat (limited to 'lisp/net/tramp-archive.el')
-rw-r--r-- | lisp/net/tramp-archive.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index a37009402cf..d2ee7299bee 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -347,10 +347,15 @@ arguments to pass to the OPERATION." ;;;###autoload (progn (defun tramp-archive-autoload-file-name-handler (operation &rest args) "Load Tramp archive file name handler, and perform OPERATION." - (if tramp-archive-enabled - (let ((tramp-archive-autoload t)) - tramp-archive-autoload ; Silence byte compiler. - (apply #'tramp-autoload-file-name-handler operation args))))) + (when tramp-archive-enabled + ;; We cannot use `tramp-compat-temporary-file-directory' here due + ;; to autoload. When installing Tramp's GNU ELPA package, there + ;; might be an older, incompatible version active. We try to + ;; overload this. + (let ((default-directory temporary-file-directory) + (tramp-archive-autoload t)) + tramp-archive-autoload ; Silence byte compiler. + (apply #'tramp-autoload-file-name-handler operation args))))) ;;;###autoload (progn (defun tramp-register-archive-file-name-handler () |