-
-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atomic Save for Setting #1763
Atomic Save for Setting #1763
Conversation
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot apply updates. |
Well I still don't understand how to let the bot apply the update🤣🤣 |
@check-spelling-bot apply updates. |
This comment has been minimized.
This comment has been minimized.
I disabled it in settings because the author says its experimental. You can edit |
Ohh no wonder I wasnt able to as well 🤣🤣 |
DW about it then since it's experimental. |
@taooceros please resolve conflict |
Atomic Save for Setting By
File.Replace
to replace the Temp File to the Setting File and create a backupInteresting thing is: I also learn this strategy in my OS class.
Tested
Should closes #641
Whether
File.Replace
is atomic is unclear to me due to discussion in https://stackoverflow.com/a/35128468/13906571. Though, if I understand the post correctly, it is safe to use if we always keep a backup, with the additional document in https://learn.microsoft.com/en-us/windows/win32/fileio/deprecation-of-txf?redirectedfrom=MSDN.