From f26ca143c48b878efa10712a9c1c362e84d479a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 26 Sep 2017 01:36:52 +0200 Subject: [PATCH] NOISSUE do not fail when the Flame overrides folder is missing --- api/logic/InstanceImportTask.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/api/logic/InstanceImportTask.cpp b/api/logic/InstanceImportTask.cpp index e5634ac49..8ce2ad2ad 100644 --- a/api/logic/InstanceImportTask.cpp +++ b/api/logic/InstanceImportTask.cpp @@ -200,11 +200,18 @@ void InstanceImportTask::processFlame() if(!pack.overrides.isEmpty()) { QString overridePath = FS::PathCombine(m_stagingPath, pack.overrides); - QString mcPath = FS::PathCombine(m_stagingPath, "minecraft"); - if (!QFile::rename(overridePath, mcPath)) + if (QFile::exists(overridePath)) { - emitFailed(tr("Could not rename the overrides folder:\n") + pack.overrides); - return; + QString mcPath = FS::PathCombine(m_stagingPath, "minecraft"); + if (!QFile::rename(overridePath, mcPath)) + { + emitFailed(tr("Could not rename the overrides folder:\n") + pack.overrides); + return; + } + } + else + { + qWarning() << "The specified overrides folder is missing. Maybe the modpack was already used before?"; } }