mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-36807: When saving a file in IDLE, call flush and fsync (#13102)
This commit is contained in:
parent
3e2afd78ba
commit
4f098b35f5
2 changed files with 3 additions and 0 deletions
|
@ -384,6 +384,8 @@ class IOBinding:
|
|||
try:
|
||||
with open(filename, "wb") as f:
|
||||
f.write(chars)
|
||||
f.flush()
|
||||
os.fsync(f.fileno())
|
||||
return True
|
||||
except OSError as msg:
|
||||
tkMessageBox.showerror("I/O Error", str(msg),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue