From 5ab38c3c5a41fdc567a9a476cfdb6b501e1272b3 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 12 Apr 2009 19:26:36 +0000 Subject: [PATCH] * tramp.el (tramp-do-copy-or-rename-file-directly): Overwrite always the tmpfile. (Bug#2962). --- lisp/ChangeLog | 5 +++++ lisp/net/tramp.el | 11 ++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 139b3f299c0..06d2cbc4678 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-04-12 Michael Albinus + + * tramp.el (tramp-do-copy-or-rename-file-directly): Overwrite + always the tmpfile. (Bug#2962). + 2009-04-11 Chong Yidong * files.el (dir-locals-directory-cache): Change format to include diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index deaabb0f61d..5339d14c344 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3255,8 +3255,8 @@ the uid and gid from FILENAME." ;; We can do it directly with `tramp-send-command' ((let (file-name-handler-alist) (and (file-readable-p (concat prefix localname1)) - (file-writable-p - (file-name-directory (concat prefix localname2))))) + (file-writable-p + (file-name-directory (concat prefix localname2))))) (tramp-do-copy-or-rename-file-directly op (concat prefix localname1) (concat prefix localname2) ok-if-already-exists keep-date t) @@ -3287,11 +3287,11 @@ the uid and gid from FILENAME." (t2 (if (eq op 'copy) (tramp-compat-copy-file - localname1 tmpfile ok-if-already-exists + localname1 tmpfile t keep-date preserve-uid-gid) (tramp-run-real-handler 'rename-file - (list localname1 tmpfile ok-if-already-exists))) + (list localname1 tmpfile t))) ;; We must change the ownership as local user. (tramp-set-file-uid-gid tmpfile @@ -7758,9 +7758,6 @@ Only works for Bourne-like shells." ;; Functions for file-name-handler-alist: ;; diff-latest-backup-file -- in diff.el ;; dired-uncache -- this will be needed when we do insert-directory caching -;; file-name-sans-versions -- use primitive? -;; get-file-buffer -- use primitive -;; vc-registered ;; arch-tag: 3a21a994-182b-48fa-b0cd-c1d9fede424a ;;; tramp.el ends here -- 2.39.5