-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix prefs maybe replaced with the default value when read and truncat…
…e at the same time Open prefs.bin via 'wb' will truncate file without lock protection. So read prefs.bin and truncate prefs.bin at the same time, the preferences maybe replaced with the default value. Add a prefs.lock file to guarantee the atomicity of save and load operation. Signed-off-by: Zou Mingzhe <[email protected]>
- Loading branch information
1 parent
d066627
commit 07ee724
Showing
2 changed files
with
31 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters