Fix stale cache in Tramp (don't merge)

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
Flush cache in time.
This commit is contained in:
Michael Albinus 2023-07-08 15:43:21 +02:00
parent 600b90ed56
commit a82486e5a4

View file

@ -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