summaryrefslogtreecommitdiffstats
path: root/api/logic/InstanceImportTask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/InstanceImportTask.cpp')
-rw-r--r--api/logic/InstanceImportTask.cpp15
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?";
}
}