tfollow up 6fb974227ba924c877e50defc36d7a3006660ef4 - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 58c2c152663001dbe796a95869da54e95b39b482
DIR parent fc72e661de7929f0c7fcbc2a6be521fa92eb4b61
HTML Author: ThomasV <thomasv@electrum.org>
Date: Fri, 8 Feb 2019 08:21:18 +0100
follow up 6fb974227ba924c877e50defc36d7a3006660ef4
Diffstat:
M electrum/storage.py | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
DIR diff --git a/electrum/storage.py b/electrum/storage.py
t@@ -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