(with-tramp-progress-reporter
v 0 (format "%s %s to %s" msg-operation filename newname)
(unless
- (apply
- #'tramp-gvfs-send-command v gvfs-operation
- (append
- (and (eq op 'copy) (or keep-date preserve-uid-gid)
- '("--preserve"))
- (list
- (tramp-gvfs-url-file-name filename)
- (tramp-gvfs-url-file-name newname))))
+ (and (apply
+ #'tramp-gvfs-send-command v gvfs-operation
+ (append
+ (and (eq op 'copy) (or keep-date preserve-uid-gid)
+ '("--preserve"))
+ (list
+ (tramp-gvfs-url-file-name filename)
+ (tramp-gvfs-url-file-name newname))))
+ ;; Some backends do not return a proper error
+ ;; code in case of direct copy/move. Apply sanity checks.
+ (or (not equal-remote)
+ (tramp-gvfs-send-command
+ v "gvfs-info" (tramp-gvfs-url-file-name newname))
+ (eq op 'copy)
+ (not (tramp-gvfs-send-command
+ v "gvfs-info"
+ (tramp-gvfs-url-file-name filename)))))
(if (or (not equal-remote)
(and equal-remote
;; Copy file to directory.
(unwind-protect
- ;; FIXME: This fails on my QNAP server, see
- ;; /share/Web/owncloud/data/owncloud.log
- (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p))
+ ;; This doesn't work on FTP.
+ (unless (tramp--test-ange-ftp-p)
(write-region "foo" nil source)
(should (file-exists-p source))
(make-directory target)
;; Copy directory to existing directory.
(unwind-protect
- ;; FIXME: This fails on my QNAP server, see
- ;; /share/Web/owncloud/data/owncloud.log
- (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p))
+ ;; This doesn't work on FTP.
+ (unless (tramp--test-ange-ftp-p)
(make-directory source)
(should (file-directory-p source))
(write-region "foo" nil (expand-file-name "foo" source))
;; Copy directory/file to non-existing directory.
(unwind-protect
- ;; FIXME: This fails on my QNAP server, see
- ;; /share/Web/owncloud/data/owncloud.log
- (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p))
+ ;; This doesn't work on FTP.
+ (unless (tramp--test-ange-ftp-p)
(make-directory source)
(should (file-directory-p source))
(write-region "foo" nil (expand-file-name "foo" source))
;; Rename directory to existing directory.
(unwind-protect
- ;; FIXME: This fails on my QNAP server, see
- ;; /share/Web/owncloud/data/owncloud.log
- (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p))
+ ;; This doesn't work on FTP.
+ (unless (tramp--test-ange-ftp-p)
(make-directory source)
(should (file-directory-p source))
(write-region "foo" nil (expand-file-name "foo" source))
;; Rename directory/file to non-existing directory.
(unwind-protect
- ;; FIXME: This fails on my QNAP server, see
- ;; /share/Web/owncloud/data/owncloud.log
- (unless (or (tramp--test-ange-ftp-p) (tramp--test-nextcloud-p))
+ ;; This doesn't work on FTP.
+ (unless (tramp--test-ange-ftp-p)
(make-directory source)
(should (file-directory-p source))
(write-region "foo" nil (expand-file-name "foo" source))