Commit d8ea4441 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix possible crash canceling archive

parent 0d85cef6
Pipeline #248273 passed with stage
in 7 minutes and 2 seconds
......@@ -1091,11 +1091,12 @@ void ArchiveWidget::createArchive()
int ix = 0;
bool success = true;
QMapIterator<QString, QString> i(m_filesList);
int max = m_filesList.count();
while (i.hasNext()) {
i.next();
m_infoMessage->setText(i18n("Archiving %1", i.key()));
success = archive->addLocalFile(i.key(), i.value());
emit archiveProgress(100 * ix / m_filesList.count());
emit archiveProgress(100 * ix / max);
ix++;
if (!success) {
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment