diff options
| author | Michael Albinus | 2018-01-04 12:58:42 +0100 |
|---|---|---|
| committer | Michael Albinus | 2018-01-04 12:58:42 +0100 |
| commit | 1cc7bc0f63ab118fda55aa40fa4b571a7c94393e (patch) | |
| tree | 51e629b8985c1e2fe68b4f7803f2cde22177cea1 | |
| parent | 13d384820d820d76702ca4a5152011006d1a57a0 (diff) | |
| download | emacs-1cc7bc0f63ab118fda55aa40fa4b571a7c94393e.tar.gz emacs-1cc7bc0f63ab118fda55aa40fa4b571a7c94393e.zip | |
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'.
| -rw-r--r-- | lisp/net/tramp-archive.el | 4 | ||||
| -rw-r--r-- | 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." | |||
| 531 | (tramp-archive-gvfs-file-name file) noerror nomessage nosuffix must-suffix)) | 531 | (tramp-archive-gvfs-file-name file) noerror nomessage nosuffix must-suffix)) |
| 532 | 532 | ||
| 533 | (defun tramp-archive-handle-temporary-file-directory () | 533 | (defun tramp-archive-handle-temporary-file-directory () |
| 534 | "Like `temporary-file-directory' for Tramp files." | 534 | "Like `temporary-file-directory' for file archives." |
| 535 | ;; If the default directory, the file archive, is located on a | 535 | ;; If the default directory, the file archive, is located on a |
| 536 | ;; mounted directory, it is returned as it. Not what we want. | 536 | ;; mounted directory, it is returned as it. Not what we want. |
| 537 | (with-parsed-tramp-archive-file-name default-directory nil | 537 | (with-parsed-tramp-archive-file-name default-directory nil |
| 538 | (let ((default-directory (file-name-directory archive))) | 538 | (let ((default-directory (file-name-directory archive))) |
| 539 | (temporary-file-directory)))) | 539 | (tramp-compat-temporary-file-directory)))) |
| 540 | 540 | ||
| 541 | (defun tramp-archive-handle-not-implemented (operation &rest args) | 541 | (defun tramp-archive-handle-not-implemented (operation &rest args) |
| 542 | "Generic handler for operations not implemented for file archives." | 542 | "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'." | |||
| 699 | tmp-file) | 699 | tmp-file) |
| 700 | ;; The file archive shall know a temporary file directory. It is | 700 | ;; The file archive shall know a temporary file directory. It is |
| 701 | ;; not in the archive itself. | 701 | ;; not in the archive itself. |
| 702 | (should (stringp (with-no-warnings (temporary-file-directory)))) | 702 | (should |
| 703 | (stringp (with-no-warnings (with-no-warnings (temporary-file-directory))))) | ||
| 703 | (should-not | 704 | (should-not |
| 704 | (tramp-archive-file-name-p (with-no-warnings (temporary-file-directory)))) | 705 | (tramp-archive-file-name-p (with-no-warnings (temporary-file-directory)))) |
| 705 | 706 | ||