[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 a82486e5a4e 1/2: Fix stale cache in Tramp (don't merge)
From: |
Michael Albinus |
Subject: |
emacs-29 a82486e5a4e 1/2: Fix stale cache in Tramp (don't merge) |
Date: |
Sat, 8 Jul 2023 09:43:59 -0400 (EDT) |
branch: emacs-29
commit a82486e5a4e1ea3abb5afb6f279b22c44f0218d8
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Fix stale cache in Tramp (don't merge)
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
Flush cache in time.
---
lisp/net/tramp-sh.el | 5 +++++
1 file changed, 5 insertions(+)
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