]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix stale cache in Tramp (don't merge)
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 8 Jul 2023 13:43:21 +0000 (15:43 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 8 Jul 2023 13:43:21 +0000 (15:43 +0200)
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
Flush cache in time.

lisp/net/tramp-sh.el

index 48ba3d09e3e33166228a643a8d0aa909a1ef7eff..502040902e1291b42eb3d03dcb4278ccb1c9d53a 100644 (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