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;
|
||||
}
|
||||
|
||||
{
|
||||
QuaZipFile indexFile(&zip);
|
||||
indexFile.setFileName("modrinth.index.json");
|
||||
if (!indexFile.open(QuaZipFile::NewOnly)) {
|
||||
if (!indexFile.open(QIODevice::WriteOnly, QuaZipNewInfo("modrinth.index.json"))) {
|
||||
QFile::remove(output);
|
||||
QMessageBox::warning(this, tr("Unable to export modpack"), tr("Could not create index"));
|
||||
return;
|
||||
}
|
||||
indexFile.write(generateIndex());
|
||||
indexFile.close();
|
||||
}
|
||||
|
||||
// should exist
|
||||
QDir dotMinecraft(instance->gameRoot());
|
||||
|
Loading…
Reference in New Issue
Block a user