Fix QuaZipFile usage
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
a5dd6b6cd7
commit
9ec32b2561
@ -86,15 +86,15 @@ void ExportMrPackDialog::runExport()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QuaZipFile indexFile(&zip);
|
{
|
||||||
indexFile.setFileName("modrinth.index.json");
|
QuaZipFile indexFile(&zip);
|
||||||
if (!indexFile.open(QuaZipFile::NewOnly)) {
|
if (!indexFile.open(QIODevice::WriteOnly, QuaZipNewInfo("modrinth.index.json"))) {
|
||||||
QFile::remove(output);
|
QFile::remove(output);
|
||||||
QMessageBox::warning(this, tr("Unable to export modpack"), tr("Could not create index"));
|
QMessageBox::warning(this, tr("Unable to export modpack"), tr("Could not create index"));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
indexFile.write(generateIndex());
|
||||||
}
|
}
|
||||||
indexFile.write(generateIndex());
|
|
||||||
indexFile.close();
|
|
||||||
|
|
||||||
// should exist
|
// should exist
|
||||||
QDir dotMinecraft(instance->gameRoot());
|
QDir dotMinecraft(instance->gameRoot());
|
||||||
|
Loading…
Reference in New Issue
Block a user