handle file removal in ExportToZipTask

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-07-17 16:55:26 +03:00
parent 78ee63af38
commit 64041a84a2
No known key found for this signature in database
GPG key ID: 55EF5DA53DB36318
5 changed files with 26 additions and 16 deletions

View file

@ -480,4 +480,15 @@ void ExportToZipTask::exportZip()
emitSucceeded();
}
void ExportToZipTask::emitAborted()
{
QFile::remove(m_output_path);
Task::emitAborted();
}
void ExportToZipTask::emitFailed(QString reason)
{
QFile::remove(m_output_path);
Task::emitFailed(reason);
}
} // namespace MMCZip