(shell-command . tramp-archive-handle-not-implemented)
(start-file-process . tramp-archive-handle-not-implemented)
;; `substitute-in-file-name' performed by default handler.
- ;; `temporary-file-directory' performed by default handler.
+ (temporary-file-directory . tramp-archive-handle-temporary-file-directory)
(unhandled-file-name-directory . ignore)
(vc-registered . ignore)
(verify-visited-file-modtime . tramp-handle-verify-visited-file-modtime)
(load
(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."
+ ;; 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))))
+
(defun tramp-archive-handle-not-implemented (operation &rest args)
"Generic handler for operations not implemented for file archives."
(let ((v (ignore-errors
;;; Code:
+;; The `tramp-archive-testnn-*' tests correspond to the respective
+;; tests in tramp-tests.el.
+
(require 'ert)
(require 'tramp-archive)
This checks also `file-name-as-directory', `file-name-directory',
`file-name-nondirectory' and `unhandled-file-name-directory'."
(skip-unless tramp-gvfs-enabled)
+
(should
(string-equal
(directory-file-name "/foo.tar/path/to/file") "/foo.tar/path/to/file"))
(zerop (nth 1 fsi))
(zerop (nth 2 fsi))))))
-(ert-deftest tramp-archive-test41-libarchive-tests ()
+(ert-deftest tramp-archive-test99-libarchive-tests ()
"Run tests of libarchive test files."
:tags '(:expensive-test)
(skip-unless tramp-gvfs-enabled)
(vc-register
(list (car vc-handled-backends)
(list (file-name-nondirectory tmp-name2))))
- ;; `vc-register' has changed its arguments in Emacs 25.1.
- (error
- (vc-register
- nil (list (car vc-handled-backends)
- (list (file-name-nondirectory tmp-name2))))))
+ ;; `vc-register' has changed its arguments in Emacs
+ ;; 25.1. Let's skip it for older Emacsen.
+ (error (skip-unless (>= emacs-major-version 25))))
;; vc-git uses an own process sentinel, Tramp's sentinel
;; for flushing the cache isn't used.
(dired-uncache (concat (file-remote-p default-directory) "/"))