fix(release): set new file permissions before durable sync

This commit is contained in:
2026-10-14 01:16:19 +08:00
parent 81c674a17e
commit d5cb46278d
2 changed files with 26 additions and 0 deletions
+1
View File
@@ -74,6 +74,7 @@ def exclusive_file(path: Path, data: bytes, mode: int) -> None:
with os.fdopen(fd, "wb", closefd=False) as output:
output.write(data)
output.flush()
os.fchmod(fd, mode)
os.fsync(fd)
finally:
os.close(fd)