changeset 109309:1d46091f1f65

* net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass empty argument to gvfs-copy.
author Michael Albinus <albinus@detlef>
date Sun, 11 Jul 2010 10:28:04 +0200
parents 3200fb11db9d
children 988ceb510e6b
files lisp/ChangeLog lisp/net/tramp-gvfs.el
diffstat 2 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Jul 11 02:59:55 2010 -0400
+++ b/lisp/ChangeLog	Sun Jul 11 10:28:04 2010 +0200
@@ -1,3 +1,8 @@
+2010-07-11  Magnus Henoch  <magnus.henoch@gmail.com>
+
+	* net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass
+	empty argument to gvfs-copy.
+
 2010-07-10  Aleksei Gusev  <aleksei.gusev@gmail.com>  (tiny change)
 
 	* progmodes/compile.el (compilation-error-regexp-alist-alist): Add
--- a/lisp/net/tramp-gvfs.el	Sun Jul 11 02:59:55 2010 -0400
+++ b/lisp/net/tramp-gvfs.el	Sun Jul 11 10:28:04 2010 +0200
@@ -551,11 +551,14 @@
 	 (tramp-message v 4 "`copy-file' failed, trying `gvfs-copy'")
 	 (unless
 	     (zerop
-	      (tramp-gvfs-send-command
-	       v "gvfs-copy"
-	       (if (or keep-date preserve-uid-gid) "--preserve" "")
-	       (tramp-gvfs-url-file-name filename)
-	       (tramp-gvfs-url-file-name newname)))
+	      (let ((args
+		     (append (if (or keep-date preserve-uid-gid)
+				 (list "--preserve")
+			       nil)
+			     (list
+			      (tramp-gvfs-url-file-name filename)
+			      (tramp-gvfs-url-file-name newname)))))
+		(apply 'tramp-gvfs-send-command v "gvfs-copy" args)))
 	   ;; Propagate the error.
 	   (tramp-error v (car err) "%s" (cdr err)))))))