Commit fc87cdf9 authored by Michael Albinus's avatar Michael Albinus
Browse files

Adapt tramp-archive-autoload-file-name-handler

* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-handler):
Bind `default-directory' to safe value.
parent c60d707f
Pipeline #10921 failed with stages
in 182 minutes and 36 seconds
......@@ -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 ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment