fix: don't try to delete mods multiple times

Shows a more helpful message if there's a parsing error when reading the
index file.

Also fixes a clazy warning with using the `.data()` method in a
temporary QByteArray object.
This commit is contained in:
flow
2022-04-21 15:47:46 -03:00
committed by flow
parent e17b6804a7
commit 67e0214fa5
2 changed files with 7 additions and 2 deletions

View File

@ -339,6 +339,9 @@ bool ModFolderModel::deleteMods(const QModelIndexList& indexes)
for (auto i: indexes)
{
if(i.column() != 0) {
continue;
}
Mod &m = mods[i.row()];
auto index_dir = indexDir();
m.destroy(index_dir);