aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/net/tramp-gvfs.el9
-rw-r--r--test/lisp/net/tramp-tests.el20
2 files changed, 22 insertions, 7 deletions
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index fe5a98909e0..1d1b04b44f8 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -683,7 +683,6 @@ file names."
683 (let ((t1 (tramp-tramp-file-p filename)) 683 (let ((t1 (tramp-tramp-file-p filename))
684 (t2 (tramp-tramp-file-p newname)) 684 (t2 (tramp-tramp-file-p newname))
685 (equal-remote (tramp-equal-remote filename newname)) 685 (equal-remote (tramp-equal-remote filename newname))
686 (file-operation (intern (format "%s-file" op)))
687 (gvfs-operation (if (eq op 'copy) "gvfs-copy" "gvfs-move")) 686 (gvfs-operation (if (eq op 'copy) "gvfs-copy" "gvfs-move"))
688 (msg-operation (if (eq op 'copy) "Copying" "Renaming"))) 687 (msg-operation (if (eq op 'copy) "Copying" "Renaming")))
689 688
@@ -698,9 +697,11 @@ file names."
698 697
699 ;; We cannot copy or rename directly. 698 ;; We cannot copy or rename directly.
700 (let ((tmpfile (tramp-compat-make-temp-file filename))) 699 (let ((tmpfile (tramp-compat-make-temp-file filename)))
701 (funcall 700 (if (eq op 'copy)
702 file-operation filename tmpfile t keep-date preserve-uid-gid 701 (copy-file
703 preserve-extended-attributes) 702 filename tmpfile t keep-date preserve-uid-gid
703 preserve-extended-attributes)
704 (rename-file filename tmpfile t))
704 (rename-file tmpfile newname ok-if-already-exists)) 705 (rename-file tmpfile newname ok-if-already-exists))
705 706
706 ;; Direct action. 707 ;; Direct action.
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 0d1e7d18d9b..a9d6e74ce26 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2810,7 +2810,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
2810 ;; Symbolic links could look like a remote file name. 2810 ;; Symbolic links could look like a remote file name.
2811 ;; They must be quoted then. 2811 ;; They must be quoted then.
2812 (delete-file tmp-name2) 2812 (delete-file tmp-name2)
2813 (make-symbolic-link "/penguin:motd:" tmp-name2) 2813 (make-symbolic-link
2814 (funcall
2815 (if quoted 'tramp-compat-file-name-unquote 'identity)
2816 "/penguin:motd:")
2817 tmp-name2)
2814 (should (file-symlink-p tmp-name2)) 2818 (should (file-symlink-p tmp-name2))
2815 (should 2819 (should
2816 (string-equal 2820 (string-equal
@@ -4642,6 +4646,10 @@ process sentinels. They shall not disturb each other."
4642 4646
4643(ert-deftest tramp-test42-delay-load () 4647(ert-deftest tramp-test42-delay-load ()
4644 "Check that Tramp is loaded lazily, only when needed." 4648 "Check that Tramp is loaded lazily, only when needed."
4649 ;; The autoloaded Tramp objects are different since Emacs 26.1. We
4650 ;; cannot test older Emacsen, therefore.
4651 (skip-unless (tramp--test-emacs26-p))
4652
4645 ;; Tramp is neither loaded at Emacs startup, nor when completing a 4653 ;; Tramp is neither loaded at Emacs startup, nor when completing a
4646 ;; non-Tramp file name like "/foo". Completing a Tramp-alike file 4654 ;; non-Tramp file name like "/foo". Completing a Tramp-alike file
4647 ;; name like "/foo:" autoloads Tramp, when `tramp-mode' is t. 4655 ;; name like "/foo:" autoloads Tramp, when `tramp-mode' is t.
@@ -4654,8 +4662,8 @@ process sentinels. They shall not disturb each other."
4654 (message \"Tramp loaded: %%s\" (featurep 'tramp)) \ 4662 (message \"Tramp loaded: %%s\" (featurep 'tramp)) \
4655 (file-name-all-completions \"/foo:\" \"/\") \ 4663 (file-name-all-completions \"/foo:\" \"/\") \
4656 (message \"Tramp loaded: %%s\" (featurep 'tramp)))")) 4664 (message \"Tramp loaded: %%s\" (featurep 'tramp)))"))
4657 ;; Tramp doesn't load when `tramp-mode' is nil since Emacs 26.1. 4665 ;; Tramp doesn't load when `tramp-mode' is nil.
4658 (dolist (tm (if (tramp--test-emacs26-p) '(t nil) '(nil))) 4666 (dolist (tm '(t nil))
4659 (should 4667 (should
4660 (string-match 4668 (string-match
4661 (format 4669 (format
@@ -4693,6 +4701,10 @@ process sentinels. They shall not disturb each other."
4693 4701
4694(ert-deftest tramp-test42-remote-load-path () 4702(ert-deftest tramp-test42-remote-load-path ()
4695 "Check that Tramp autoloads its packages with remote `load-path'." 4703 "Check that Tramp autoloads its packages with remote `load-path'."
4704 ;; The autoloaded Tramp objects are different since Emacs 26.1. We
4705 ;; cannot test older Emacsen, therefore.
4706 (skip-unless (tramp--test-emacs26-p))
4707
4696 ;; `tramp-cleanup-all-connections' is autoloaded from tramp-cmds.el. 4708 ;; `tramp-cleanup-all-connections' is autoloaded from tramp-cmds.el.
4697 ;; It shall still work, when a remote file name is in the 4709 ;; It shall still work, when a remote file name is in the
4698 ;; `load-path'. 4710 ;; `load-path'.
@@ -4770,6 +4782,8 @@ Since it unloads Tramp, it shall be the last test to run."
4770 4782
4771;; * dired-compress-file 4783;; * dired-compress-file
4772;; * dired-uncache 4784;; * dired-uncache
4785;; * file-equal-p (partly done in `tramp-test21-file-links')
4786;; * file-in-directory-p
4773;; * file-name-case-insensitive-p 4787;; * file-name-case-insensitive-p
4774 4788
4775;; * Work on skipped tests. Make a comment, when it is impossible. 4789;; * Work on skipped tests. Make a comment, when it is impossible.