From 1cc7bc0f63ab118fda55aa40fa4b571a7c94393e Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 4 Jan 2018 12:58:42 +0100 Subject: [PATCH] Improve backward compatibility in tramp-archive * lisp/net/tramp-archive.el (tramp-archive-handle-temporary-file-directory): Use `tramp-compat-temporary-file-directory'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test37-make-nearby-temp-file): Wrap `temporary-file-directory' call with `with-no-warnings'. --- lisp/net/tramp-archive.el | 4 ++-- test/lisp/net/tramp-archive-tests.el | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 6c96075a001..45e3bf0a606 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -531,12 +531,12 @@ offered." (tramp-archive-gvfs-file-name file) noerror nomessage nosuffix must-suffix)) (defun tramp-archive-handle-temporary-file-directory () - "Like `temporary-file-directory' for Tramp files." + "Like `temporary-file-directory' for file archives." ;; If the default directory, the file archive, is located on a ;; mounted directory, it is returned as it. Not what we want. (with-parsed-tramp-archive-file-name default-directory nil (let ((default-directory (file-name-directory archive))) - (temporary-file-directory)))) + (tramp-compat-temporary-file-directory)))) (defun tramp-archive-handle-not-implemented (operation &rest args) "Generic handler for operations not implemented for file archives." diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index 85be2dc6230..149ed370432 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el @@ -699,7 +699,8 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." tmp-file) ;; The file archive shall know a temporary file directory. It is ;; not in the archive itself. - (should (stringp (with-no-warnings (temporary-file-directory)))) + (should + (stringp (with-no-warnings (with-no-warnings (temporary-file-directory))))) (should-not (tramp-archive-file-name-p (with-no-warnings (temporary-file-directory)))) -- 2.39.2