mirror of
https://github.com/alexta69/metube.git
synced 2026-07-23 13:22:48 +00:00
fix: fsync parent dir after direct-write fallback for durability parity
This commit is contained in:
@@ -169,6 +169,8 @@ class AtomicJsonStore:
|
||||
f.write(text)
|
||||
f.flush()
|
||||
self._best_effort_fsync(f.fileno())
|
||||
# Make the new directory entry durable too, matching the atomic path.
|
||||
self._fsync_directory(os.path.dirname(self.path) or ".")
|
||||
|
||||
@staticmethod
|
||||
def _best_effort_fsync(fileno: int) -> None:
|
||||
|
||||
Reference in New Issue
Block a user