iwla

iwla Commit Details

Date:2017-01-29 09:13:32 (4 years 6 months ago)
Author:Grégory Soutadé
Branch:dev, master
Commit:a07fd14a359e195066b9cddf8656ab7e213b585e
Parents: 038e4850817a9c82abab42abf50f734c1e8df48b
Message:Database compression could lead to altered files. Use fsync before compressing to resolve this problem

Changes:
Miwla.py (1 diff)

File differences

iwla.py
249249
250250
251251
252
252253
253254
254255
with open(filename + '.tmp', 'wb+') as f, self._openDB(filename, 'w') as fzip:
pickle.dump(obj, f)
os.fsync(f)
f.seek(0)
fzip.write(f.read())
os.remove(filename + '.tmp')

Archive Download the corresponding diff file

Branches

Tags