Skip to content

Commit 311ee62

Browse files
authored
Merge a85dab0 into bf96860
2 parents bf96860 + a85dab0 commit 311ee62

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

source/addonStore/dataManager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,14 @@ def _getCachedAddonData(self, cacheFilePath: str) -> Optional[CachedAddonsModel]
176176
try:
177177
with open(cacheFilePath, 'r', encoding='utf-8') as cacheFile:
178178
cacheData = json.load(cacheFile)
179-
except Exception:
179+
except (KeyError, JSONDecodeError):
180180
log.exception(f"Invalid add-on store cache")
181181
if NVDAState.shouldWriteToDisk():
182182
os.remove(cacheFilePath)
183183
return None
184184
try:
185185
data = cacheData["data"]
186+
cachedAddonData = _createStoreCollectionFromJson(data)
186187
cacheHash = cacheData["cacheHash"]
187188
cachedLanguage = cacheData["cachedLanguage"]
188189
nvdaAPIVersion = cacheData["nvdaAPIVersion"]
@@ -192,7 +193,7 @@ def _getCachedAddonData(self, cacheFilePath: str) -> Optional[CachedAddonsModel]
192193
os.remove(cacheFilePath)
193194
return None
194195
return CachedAddonsModel(
195-
cachedAddonData=_createStoreCollectionFromJson(data),
196+
cachedAddonData=cachedAddonData,
196197
cacheHash=cacheHash,
197198
cachedLanguage=cachedLanguage,
198199
nvdaAPIVersion=tuple(nvdaAPIVersion), # loads as list,

user_docs/en/changes.t2t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ There are many minor bug fixes for applications, such as Thunderbird, Adobe Read
9292
-
9393
- Add-on Store:
9494
- When pressing ``ctrl+tab``, focus properly moves to the new current tab title. (#14986, @ABuffEr)
95+
- If cache files are not correct, NVDA no longer will restart. (#16362, @nvdaes)
9596
-
9697
- Fixes for Chromium-based browsers when used with UIA:
9798
- Fixed bugs causing NVDA to hang. (#16393, #16394)

0 commit comments

Comments
 (0)