diff options
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 9 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 20 |
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 0490daa9575..1261a81378d 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 |
| @@ -4631,6 +4635,10 @@ process sentinels. They shall not disturb each other." | |||
| 4631 | 4635 | ||
| 4632 | (ert-deftest tramp-test42-delay-load () | 4636 | (ert-deftest tramp-test42-delay-load () |
| 4633 | "Check that Tramp is loaded lazily, only when needed." | 4637 | "Check that Tramp is loaded lazily, only when needed." |
| 4638 | ;; The autoloaded Tramp objects are different since Emacs 26.1. We | ||
| 4639 | ;; cannot test older Emacsen, therefore. | ||
| 4640 | (skip-unless (tramp--test-emacs26-p)) | ||
| 4641 | |||
| 4634 | ;; Tramp is neither loaded at Emacs startup, nor when completing a | 4642 | ;; Tramp is neither loaded at Emacs startup, nor when completing a |
| 4635 | ;; non-Tramp file name like "/foo". Completing a Tramp-alike file | 4643 | ;; non-Tramp file name like "/foo". Completing a Tramp-alike file |
| 4636 | ;; name like "/foo:" autoloads Tramp, when `tramp-mode' is t. | 4644 | ;; name like "/foo:" autoloads Tramp, when `tramp-mode' is t. |
| @@ -4643,8 +4651,8 @@ process sentinels. They shall not disturb each other." | |||
| 4643 | (message \"Tramp loaded: %%s\" (featurep 'tramp)) \ | 4651 | (message \"Tramp loaded: %%s\" (featurep 'tramp)) \ |
| 4644 | (file-name-all-completions \"/foo:\" \"/\") \ | 4652 | (file-name-all-completions \"/foo:\" \"/\") \ |
| 4645 | (message \"Tramp loaded: %%s\" (featurep 'tramp)))")) | 4653 | (message \"Tramp loaded: %%s\" (featurep 'tramp)))")) |
| 4646 | ;; Tramp doesn't load when `tramp-mode' is nil since Emacs 26.1. | 4654 | ;; Tramp doesn't load when `tramp-mode' is nil. |
| 4647 | (dolist (tm (if (tramp--test-emacs26-p) '(t nil) '(nil))) | 4655 | (dolist (tm '(t nil)) |
| 4648 | (should | 4656 | (should |
| 4649 | (string-match | 4657 | (string-match |
| 4650 | (format | 4658 | (format |
| @@ -4682,6 +4690,10 @@ process sentinels. They shall not disturb each other." | |||
| 4682 | 4690 | ||
| 4683 | (ert-deftest tramp-test42-remote-load-path () | 4691 | (ert-deftest tramp-test42-remote-load-path () |
| 4684 | "Check that Tramp autoloads its packages with remote `load-path'." | 4692 | "Check that Tramp autoloads its packages with remote `load-path'." |
| 4693 | ;; The autoloaded Tramp objects are different since Emacs 26.1. We | ||
| 4694 | ;; cannot test older Emacsen, therefore. | ||
| 4695 | (skip-unless (tramp--test-emacs26-p)) | ||
| 4696 | |||
| 4685 | ;; `tramp-cleanup-all-connections' is autoloaded from tramp-cmds.el. | 4697 | ;; `tramp-cleanup-all-connections' is autoloaded from tramp-cmds.el. |
| 4686 | ;; It shall still work, when a remote file name is in the | 4698 | ;; It shall still work, when a remote file name is in the |
| 4687 | ;; `load-path'. | 4699 | ;; `load-path'. |
| @@ -4759,6 +4771,8 @@ Since it unloads Tramp, it shall be the last test to run." | |||
| 4759 | 4771 | ||
| 4760 | ;; * dired-compress-file | 4772 | ;; * dired-compress-file |
| 4761 | ;; * dired-uncache | 4773 | ;; * dired-uncache |
| 4774 | ;; * file-equal-p (partly done in `tramp-test21-file-links') | ||
| 4775 | ;; * file-in-directory-p | ||
| 4762 | ;; * file-name-case-insensitive-p | 4776 | ;; * file-name-case-insensitive-p |
| 4763 | 4777 | ||
| 4764 | ;; * Work on skipped tests. Make a comment, when it is impossible. | 4778 | ;; * Work on skipped tests. Make a comment, when it is impossible. |