mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 21:43:23 -05:00
fix: write scraped files whole or not at all
This commit is contained in:
1 parent
170b7d93ae
commit
a00f57ad37
7 files changed
+51
-19
No files matched your search
@@ -60,7 +60,7 @@ def write_text_atomic(path: str, content: str) -> None:
|
||||
dir=directory, prefix=f".{os.path.basename(path)}.", suffix=".tmp"
|
||||
)
|
||||
try:
|
||||
with os.fdopen(handle, "w") as f:
|
||||
with os.fdopen(handle, "w", encoding="utf-8") as f:
|
||||
f.write(content)
|
||||
os.replace(scratch, path)
|
||||
except BaseException:
|
||||
|
||||
Reference in new issue
Block a user