mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:15:31 +00:00
Fail on the first error whilst extracting an archive
This commit is contained in:
parent
667b0de250
commit
ef617fdf3d
1 changed files with 10 additions and 1 deletions
|
@ -752,7 +752,7 @@ bool Wizard::UnshieldWorker::extractFile(Unshield *unshield, const QString &dest
|
|||
success = unshield_file_save(unshield, index, array.constData());
|
||||
|
||||
if (!success) {
|
||||
emit error(tr("Failed to extract %1.").arg(QString::fromUtf8(unshield_file_name(unshield, index))), tr("Complete path: %1.").arg(fileName));
|
||||
qDebug() << "error";
|
||||
dir.remove(fileName);
|
||||
}
|
||||
|
||||
|
@ -783,6 +783,15 @@ bool Wizard::UnshieldWorker::extractCab(const QString &cabFile, const QString &d
|
|||
{
|
||||
if (unshield_file_is_valid(unshield, j)) {
|
||||
success = extractFile(unshield, destination, group->name, j, counter);
|
||||
|
||||
if (!success) {
|
||||
QString name(QString::fromUtf8(unshield_file_name(unshield, j)));
|
||||
|
||||
emit error(tr("Failed to extract %1.").arg(name),
|
||||
tr("Complete path: %1").arg(destination + QDir::separator() + name));
|
||||
return false;
|
||||
}
|
||||
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue