handle file removal in ExportToZipTask
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -208,14 +208,10 @@ void ModrinthPackExportTask::buildZip()
|
||||
});
|
||||
|
||||
connect(zipTask.get(), &Task::succeeded, this, &ModrinthPackExportTask::emitSucceeded);
|
||||
connect(zipTask.get(), &Task::aborted, this, [this]() {
|
||||
QFile::remove(output);
|
||||
emitAborted();
|
||||
});
|
||||
connect(zipTask.get(), &Task::aborted, this, &ModrinthPackExportTask::emitAborted);
|
||||
connect(zipTask.get(), &Task::failed, this, [this, progressStep](QString reason) {
|
||||
progressStep->state = TaskStepState::Failed;
|
||||
stepProgress(*progressStep);
|
||||
QFile::remove(output);
|
||||
emitFailed(reason);
|
||||
});
|
||||
connect(zipTask.get(), &Task::stepProgress, this, &ModrinthPackExportTask::propogateStepProgress);
|
||||
|
Reference in New Issue
Block a user