diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-04-23 02:31:13 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-04-23 02:34:16 +0200 |
commit | 3f24c4cfe5afe47eb8ce6f0201b9099e4e50e8ba (patch) | |
tree | 298901b19ddf1bd645690bfe1d918d0c20e69780 /api/logic/MMCZip.cpp | |
parent | b414bbe395d8056365368fde823535fdde398e4c (diff) | |
download | MultiMC-3f24c4cfe5afe47eb8ce6f0201b9099e4e50e8ba.tar MultiMC-3f24c4cfe5afe47eb8ce6f0201b9099e4e50e8ba.tar.gz MultiMC-3f24c4cfe5afe47eb8ce6f0201b9099e4e50e8ba.tar.lz MultiMC-3f24c4cfe5afe47eb8ce6f0201b9099e4e50e8ba.tar.xz MultiMC-3f24c4cfe5afe47eb8ce6f0201b9099e4e50e8ba.zip |
GH-1856 Make MultiMC fail hard when things are missing
Things like:
* jar mods
* valid version files
Diffstat (limited to 'api/logic/MMCZip.cpp')
-rw-r--r-- | api/logic/MMCZip.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/api/logic/MMCZip.cpp b/api/logic/MMCZip.cpp index 0f35bc70..50e352b4 100644 --- a/api/logic/MMCZip.cpp +++ b/api/logic/MMCZip.cpp @@ -279,6 +279,14 @@ bool MMCZip::createModdedJar(QString sourceJarPath, QString targetJarPath, const qDebug() << "Adding folder " << filename.fileName() << " from " << filename.absoluteFilePath(); } + else + { + // Make sure we do not continue launching when something is missing or undefined... + zipOut.close(); + QFile::remove(targetJarPath); + qCritical() << "Failed to add unknown mod type" << mod.filename().fileName() << "to the jar."; + return false; + } } if (!mergeZipFiles(&zipOut, QFileInfo(sourceJarPath), addedFiles, metaInfFilter)) |