mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-06 14:02:07 -08:00
Tramp cache fixes
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Flush the cache after the file has been written.
This commit is contained in:
parent
90b6ba0a16
commit
e6c6486ee0
2 changed files with 8 additions and 6 deletions
|
|
@ -629,9 +629,6 @@ But handle the case, if the \"test\" command is not available."
|
|||
(format "File %s exists; overwrite anyway? " filename)))))
|
||||
(tramp-error v 'file-already-exists filename))
|
||||
|
||||
;; We must also flush the cache of the directory, because
|
||||
;; `file-attributes' reads the values from there.
|
||||
(tramp-flush-file-properties v localname)
|
||||
(let* ((curbuf (current-buffer))
|
||||
(tmpfile (tramp-compat-make-temp-file filename)))
|
||||
(when (and append (file-exists-p filename))
|
||||
|
|
@ -648,6 +645,10 @@ But handle the case, if the \"test\" command is not available."
|
|||
(tramp-error v 'file-error "Cannot write: `%s'" filename))
|
||||
(delete-file tmpfile)))
|
||||
|
||||
;; We must also flush the cache of the directory, because
|
||||
;; `file-attributes' reads the values from there.
|
||||
(tramp-flush-file-properties v localname)
|
||||
|
||||
(unless (equal curbuf (current-buffer))
|
||||
(tramp-error
|
||||
v 'file-error
|
||||
|
|
|
|||
|
|
@ -1557,9 +1557,6 @@ errors for shares like \"C$/\", which are common in Microsoft Windows."
|
|||
(format "File %s exists; overwrite anyway? " filename)))))
|
||||
(tramp-error v 'file-already-exists filename))
|
||||
|
||||
;; We must also flush the cache of the directory, because
|
||||
;; `file-attributes' reads the values from there.
|
||||
(tramp-flush-file-properties v localname)
|
||||
(let ((curbuf (current-buffer))
|
||||
(tmpfile (tramp-compat-make-temp-file filename)))
|
||||
(when (and append (file-exists-p filename))
|
||||
|
|
@ -1579,6 +1576,10 @@ errors for shares like \"C$/\", which are common in Microsoft Windows."
|
|||
(tramp-error v 'file-error "Cannot write `%s'" filename))
|
||||
(delete-file tmpfile)))
|
||||
|
||||
;; We must also flush the cache of the directory, because
|
||||
;; `file-attributes' reads the values from there.
|
||||
(tramp-flush-file-properties v localname)
|
||||
|
||||
(unless (equal curbuf (current-buffer))
|
||||
(tramp-error
|
||||
v 'file-error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue