only update recents on successful open

This commit is contained in:
RickyRister 2024-12-24 16:46:18 -08:00
parent cb293db09a
commit 42a8b4b264

View file

@ -162,12 +162,12 @@ void TabDeckStorage::actOpenLocalDeck()
return;
QString filePath = localDirModel->filePath(curLeft);
SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(filePath);
DeckLoader deckLoader;
if (!deckLoader.loadFromFile(filePath, DeckLoader::CockatriceFormat))
return;
SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(filePath);
emit openDeckEditor(&deckLoader);
}
}