mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-05 05:15:12 +00:00
follow up 6fb974227b
This commit is contained in:
parent
fc72e661de
commit
58c2c15266
1 changed files with 2 additions and 0 deletions
|
@ -137,6 +137,8 @@ class JsonDB(PrintError):
|
|||
os.fsync(f.fileno())
|
||||
|
||||
mode = os.stat(self.path).st_mode if self.file_exists() else stat.S_IREAD | stat.S_IWRITE
|
||||
if not file_exists():
|
||||
assert not os.path.exists(self.path)
|
||||
os.replace(temp_path, self.path)
|
||||
os.chmod(self.path, mode)
|
||||
self._file_exists = True
|
||||
|
|
Loading…
Add table
Reference in a new issue