Keep a backup of a corrupted config when reinitializing it#15779
Merged
Conversation
seanbudd
approved these changes
Nov 14, 2023
Collaborator
|
Thanks @CyrilleB79!
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Related to #14424 and #14412
Summary of the issue:
In some situation, the configuration file nvda.ini may be corrupted. This can happen if the user has edited the file manually or in some cases when NVDA is downgraded. It may also happen in the case of a bug during the development phase of NVDA (alpha releases) or of add-ons.
When the configuration file is corrupted, it cannot be used. Thus NVDA deletes it and starts with a brand new config. It also warns the user with a message box indicating that the config has been reset and that more information can be found in the log. However in some case, the user may want to fix the issues in the corrupted file manually instead of re-creating all the parameters from the new config.
Description of user facing changes
Before re-creating a new config, a backup of the old corrupted file is saved so that the user can turn back to it if they want. The logged message also indicates the presence of this file.
Description of development approach
See above.
Testing strategy:
Tested this PR by manually corrupting the nvda.ini file, i.e. removing a square bracket to a section name.
Known issues with pull request:
None.
Code Review Checklist: