]> code.delx.au - gnu-emacs/commitdiff
* net/tramp.el (tramp-do-copy-or-rename-file): Fix check for
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 30 Mar 2008 18:08:20 +0000 (18:08 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 30 Mar 2008 18:08:20 +0000 (18:08 +0000)
overwriting when NEWNAME is a local file.

doc/misc/ChangeLog
lisp/ChangeLog
lisp/net/tramp.el

index 5ee5d887a4c4f9027321e32667a65c0635658f8f..5b7883974c4eccd9e30c47a30d24dc0f41aa70ec 100644 (file)
@@ -4,6 +4,8 @@
        dbus-call-method.
        (Receiving Method Calls): The timeout can be set by the calling client.
 
+       * trampver.texi: Update release number.
+
 2008-03-29  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus.texi (Top): Fix version.  Add SASL.
index fa92b9c04d1cf3659e9f43a389db29e21aaf2af1..02aa6a91f700da624a7b2358b5bbc08a4988cc25 100644 (file)
@@ -1,3 +1,10 @@
+2008-03-30  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-do-copy-or-rename-file): Fix check for
+       overwriting when NEWNAME is a local file.
+
+       * net/trampver.el: Update release number.
+
 2008-03-30  Alexandre Julliard  <julliard@winehq.org>
 
        * vc-git.el: Make vc-status display information about copies,
index ac6f64a45da73ad25fd387f2461b985ac79fb0c5..b30667fa9fb90e7818bd3a4f8b11b578eec99e80 100644 (file)
@@ -2955,11 +2955,10 @@ and `rename'.  FILENAME and NEWNAME must be absolute file names."
   (let ((t1 (tramp-tramp-file-p filename))
        (t2 (tramp-tramp-file-p newname)))
 
-    (unless ok-if-already-exists
-      (when (and t2 (file-exists-p newname))
-       (with-parsed-tramp-file-name newname nil
-         (tramp-error
-          v 'file-already-exists "File %s already exists" newname))))
+    (when (and (not ok-if-already-exists) (file-exists-p newname))
+      (with-parsed-tramp-file-name (if t1 filename newname) nil
+       (tramp-error
+        v 'file-already-exists "File %s already exists" newname)))
 
     (prog1
        (cond