diff options
| -rw-r--r-- | lisp/net/tramp-archive.el | 10 | ||||
| -rw-r--r-- | test/lisp/net/tramp-archive-tests.el | 6 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 8 |
3 files changed, 17 insertions, 7 deletions
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index cfd68fb8361..d3b2712fb39 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el | |||
| @@ -245,7 +245,7 @@ It must be supported by libarchive(3).") | |||
| 245 | (shell-command . tramp-archive-handle-not-implemented) | 245 | (shell-command . tramp-archive-handle-not-implemented) |
| 246 | (start-file-process . tramp-archive-handle-not-implemented) | 246 | (start-file-process . tramp-archive-handle-not-implemented) |
| 247 | ;; `substitute-in-file-name' performed by default handler. | 247 | ;; `substitute-in-file-name' performed by default handler. |
| 248 | ;; `temporary-file-directory' performed by default handler. | 248 | (temporary-file-directory . tramp-archive-handle-temporary-file-directory) |
| 249 | (unhandled-file-name-directory . ignore) | 249 | (unhandled-file-name-directory . ignore) |
| 250 | (vc-registered . ignore) | 250 | (vc-registered . ignore) |
| 251 | (verify-visited-file-modtime . tramp-handle-verify-visited-file-modtime) | 251 | (verify-visited-file-modtime . tramp-handle-verify-visited-file-modtime) |
| @@ -530,6 +530,14 @@ offered." | |||
| 530 | (load | 530 | (load |
| 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 () | ||
| 534 | "Like `temporary-file-directory' for Tramp files." | ||
| 535 | ;; If the default directory, the file archive, is located on a | ||
| 536 | ;; mounted directory, it is returned as it. Not what we want. | ||
| 537 | (with-parsed-tramp-archive-file-name default-directory nil | ||
| 538 | (let ((default-directory (file-name-directory archive))) | ||
| 539 | (temporary-file-directory)))) | ||
| 540 | |||
| 533 | (defun tramp-archive-handle-not-implemented (operation &rest args) | 541 | (defun tramp-archive-handle-not-implemented (operation &rest args) |
| 534 | "Generic handler for operations not implemented for file archives." | 542 | "Generic handler for operations not implemented for file archives." |
| 535 | (let ((v (ignore-errors | 543 | (let ((v (ignore-errors |
diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index 2c9f56e47c7..464eb6c8b82 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el | |||
| @@ -19,6 +19,9 @@ | |||
| 19 | 19 | ||
| 20 | ;;; Code: | 20 | ;;; Code: |
| 21 | 21 | ||
| 22 | ;; The `tramp-archive-testnn-*' tests correspond to the respective | ||
| 23 | ;; tests in tramp-tests.el. | ||
| 24 | |||
| 22 | (require 'ert) | 25 | (require 'ert) |
| 23 | (require 'tramp-archive) | 26 | (require 'tramp-archive) |
| 24 | 27 | ||
| @@ -206,6 +209,7 @@ variables, so we check the Emacs version directly." | |||
| 206 | This checks also `file-name-as-directory', `file-name-directory', | 209 | This checks also `file-name-as-directory', `file-name-directory', |
| 207 | `file-name-nondirectory' and `unhandled-file-name-directory'." | 210 | `file-name-nondirectory' and `unhandled-file-name-directory'." |
| 208 | (skip-unless tramp-gvfs-enabled) | 211 | (skip-unless tramp-gvfs-enabled) |
| 212 | |||
| 209 | (should | 213 | (should |
| 210 | (string-equal | 214 | (string-equal |
| 211 | (directory-file-name "/foo.tar/path/to/file") "/foo.tar/path/to/file")) | 215 | (directory-file-name "/foo.tar/path/to/file") "/foo.tar/path/to/file")) |
| @@ -734,7 +738,7 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." | |||
| 734 | (zerop (nth 1 fsi)) | 738 | (zerop (nth 1 fsi)) |
| 735 | (zerop (nth 2 fsi)))))) | 739 | (zerop (nth 2 fsi)))))) |
| 736 | 740 | ||
| 737 | (ert-deftest tramp-archive-test41-libarchive-tests () | 741 | (ert-deftest tramp-archive-test99-libarchive-tests () |
| 738 | "Run tests of libarchive test files." | 742 | "Run tests of libarchive test files." |
| 739 | :tags '(:expensive-test) | 743 | :tags '(:expensive-test) |
| 740 | (skip-unless tramp-gvfs-enabled) | 744 | (skip-unless tramp-gvfs-enabled) |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 41687e41c8d..5a52059158f 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -3783,11 +3783,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3783 | (vc-register | 3783 | (vc-register |
| 3784 | (list (car vc-handled-backends) | 3784 | (list (car vc-handled-backends) |
| 3785 | (list (file-name-nondirectory tmp-name2)))) | 3785 | (list (file-name-nondirectory tmp-name2)))) |
| 3786 | ;; `vc-register' has changed its arguments in Emacs 25.1. | 3786 | ;; `vc-register' has changed its arguments in Emacs |
| 3787 | (error | 3787 | ;; 25.1. Let's skip it for older Emacsen. |
| 3788 | (vc-register | 3788 | (error (skip-unless (>= emacs-major-version 25)))) |
| 3789 | nil (list (car vc-handled-backends) | ||
| 3790 | (list (file-name-nondirectory tmp-name2)))))) | ||
| 3791 | ;; vc-git uses an own process sentinel, Tramp's sentinel | 3789 | ;; vc-git uses an own process sentinel, Tramp's sentinel |
| 3792 | ;; for flushing the cache isn't used. | 3790 | ;; for flushing the cache isn't used. |
| 3793 | (dired-uncache (concat (file-remote-p default-directory) "/")) | 3791 | (dired-uncache (concat (file-remote-p default-directory) "/")) |