diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-09-26 01:36:52 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-09-26 01:36:52 +0200 |
commit | f26ca143c48b878efa10712a9c1c362e84d479a5 (patch) | |
tree | 169fb940ee5f70fbc49c70b666b8f7ee178402c1 | |
parent | a269e0c92f27fcae19622f15f2d82b45f893aaa6 (diff) | |
download | MultiMC-f26ca143c48b878efa10712a9c1c362e84d479a5.tar MultiMC-f26ca143c48b878efa10712a9c1c362e84d479a5.tar.gz MultiMC-f26ca143c48b878efa10712a9c1c362e84d479a5.tar.lz MultiMC-f26ca143c48b878efa10712a9c1c362e84d479a5.tar.xz MultiMC-f26ca143c48b878efa10712a9c1c362e84d479a5.zip |
NOISSUE do not fail when the Flame overrides folder is missing
-rw-r--r-- | api/logic/InstanceImportTask.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/api/logic/InstanceImportTask.cpp b/api/logic/InstanceImportTask.cpp index e5634ac4..8ce2ad2a 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?"; } } |