]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve backward compatibility in tramp-archive
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 4 Jan 2018 11:58:42 +0000 (12:58 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 4 Jan 2018 11:58:42 +0000 (12:58 +0100)
* 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
test/lisp/net/tramp-archive-tests.el

index 6c96075a0016f5b8a3443c9e64e528df6ada46dd..45e3bf0a6060d090851f086a268590b71aa871d1 100644 (file)
@@ -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."
index 85be2dc62301b660bacd0e9fbd31441ecec12d9f..149ed37043263cb1eb51e77bd9de6cf7a09e704d 100644 (file)
@@ -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))))