From: Michael Albinus Date: Sat, 8 Jul 2023 13:43:21 +0000 (+0200) Subject: Fix stale cache in Tramp (don't merge) X-Git-Tag: emacs-29.1-rc1~61 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a82486e5a4e1ea3abb5afb6f279b22c44f0218d8;p=emacs.git Fix stale cache in Tramp (don't merge) * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): Flush cache in time. --- diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 48ba3d09e3e..502040902e1 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2338,6 +2338,11 @@ the uid and gid from FILENAME." ;; Save exit. (ignore-errors (delete-file tmpfile))))))))) + ;; When newname did exist, we have wrong cached values. + (when t2 + (with-parsed-tramp-file-name newname v2 + (tramp-flush-file-properties v2 v2-localname))) + ;; Set the time and mode. Mask possible errors. (ignore-errors (when keep-date