Commit 345154a
authored
Bugfix when resetting configuration (nvaccess#14894)
Fixes nvaccess#13187
Summary of the issue:
After having modified a parameter in a profile and then reset it to its original value with NVDA+control+C, it was not possible to save the configuration with NVDA+control+R; NVDA was complaining that the file system was probably read-only.
Description of user facing changes
NVDA will no longer refuse to save the configuration after a configuration reset.
Description of development approach
Bugfix: when resetting the config, config.conf._dirtyProfiles is cleared
I have also narrowed the exception filtering when saving the config since in nvaccess#13187, we get a message related to file write error, whereas the real error had nothing to do with it: it was a KeyError when trying to find "notepad" in config.conf._profileCache. I have filtered on PermissionError which is the error that I get when I set nvda.ini (or the whole NVDA setting folder) as read-only and try to save the config.1 parent e77bde9 commit 345154a
3 files changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
717 | | - | |
| 717 | + | |
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
| |||
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
| 731 | + | |
731 | 732 | | |
732 | 733 | | |
733 | 734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
0 commit comments