From da1975d727df98700b50f9b2d714c6d93d0e117d Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 30 Mar 2008 18:08:20 +0000 Subject: [PATCH] * net/tramp.el (tramp-do-copy-or-rename-file): Fix check for overwriting when NEWNAME is a local file. --- doc/misc/ChangeLog | 2 ++ lisp/ChangeLog | 7 +++++++ lisp/net/tramp.el | 9 ++++----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 5ee5d887a4c..5b7883974c4 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -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 * gnus.texi (Top): Fix version. Add SASL. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fa92b9c04d1..02aa6a91f70 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2008-03-30 Michael Albinus + + * 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 * vc-git.el: Make vc-status display information about copies, diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index ac6f64a45da..b30667fa9fb 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -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 -- 2.39.5