From: Michael Albinus Date: Thu, 24 Jan 2008 21:28:56 +0000 (+0000) Subject: * net/tramp.el (tramp-do-copy-or-rename-file): Flush the cache of X-Git-Tag: emacs-pretest-23.0.90~8428 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=484ea0b6c9e54a6e58bbf240bd723161c4d6d4cf;p=emacs.git * net/tramp.el (tramp-do-copy-or-rename-file): Flush the cache of the source file in case of `rename'. Reported by Pete Forman . --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 761a8fa3f81..2cc13c1c664 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-01-24 Michael Albinus + + * net/tramp.el (tramp-do-copy-or-rename-file): Flush the cache of + the source file in case of `rename'. Reported by Pete Forman + . + 2008-01-24 Ken Manheimer * allout.el (allout-keybindings-list): In initial setting, express diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 7c3153fc0be..4aa092ad704 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3034,6 +3034,11 @@ and `rename'. FILENAME and NEWNAME must be absolute file names." ;; One of them must be a Tramp file. (error "Tramp implementation says this cannot happen"))) + ;; In case of `rename', we must flush the cache of the source file. + (when (and t1 (eq op 'rename)) + (with-parsed-tramp-file-name filename nil + (tramp-flush-file-property v localname))) + ;; When newname did exist, we have wrong cached values. (when t2 (with-parsed-tramp-file-name newname nil