diff --git a/launcher/InstanceImportTask.cpp b/launcher/InstanceImportTask.cpp index 6bc17e058..bbf36037e 100644 --- a/launcher/InstanceImportTask.cpp +++ b/launcher/InstanceImportTask.cpp @@ -150,22 +150,17 @@ void InstanceImportTask::processZipPack() extractDir.cd("minecraft"); m_modpackType = ModpackType::Technic; stop = true; - } else { - QFileInfo fileInfo(fileName); - if (fileInfo.fileName() == "instance.cfg") { - qDebug() << "MultiMC:" << true; - m_modpackType = ModpackType::MultiMC; - root = cleanPath(fileInfo.path()); - stop = true; - return true; - } - if (fileInfo.fileName() == "manifest.json") { - qDebug() << "Flame:" << true; - m_modpackType = ModpackType::Flame; - root = cleanPath(fileInfo.path()); - stop = true; - return true; - } + } else if (fileName == "manifest.json") { + qDebug() << "Flame:" << true; + m_modpackType = ModpackType::Flame; + stop = true; + return true; + } else if (QFileInfo fileInfo(fileName); fileInfo.fileName() == "instance.cfg") { + qDebug() << "MultiMC:" << true; + m_modpackType = ModpackType::MultiMC; + root = cleanPath(fileInfo.path()); + stop = true; + return true; } QCoreApplication::processEvents(); return true;