mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-27 03:14:49 +00:00
Merge pull request #5389 from arthomnix/mrpack-config-fix
NOISSUE Fix configs sometimes not being included in exported mrpacks
This commit is contained in:
commit
a180553d0f
@ -225,9 +225,10 @@ void InstanceExportTask::lookupSucceeded()
|
||||
if (tmp.isValid()) {
|
||||
Json::write(indexJson, tmp.path() + "/modrinth.index.json");
|
||||
|
||||
QDir tmpDir(tmp.path());
|
||||
QDir gameDir(m_instance->gameRoot());
|
||||
|
||||
if (!failedFiles.isEmpty()) {
|
||||
QDir tmpDir(tmp.path());
|
||||
QDir gameDir(m_instance->gameRoot());
|
||||
for (const auto &file : failedFiles) {
|
||||
QString src = file.absoluteFilePath();
|
||||
tmpDir.mkpath("overrides/" + gameDir.relativeFilePath(file.absolutePath()));
|
||||
@ -237,17 +238,17 @@ void InstanceExportTask::lookupSucceeded()
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_settings.includeGameConfig) {
|
||||
tmpDir.mkdir("overrides");
|
||||
QFile::copy(gameDir.absoluteFilePath("options.txt"), tmpDir.absoluteFilePath("overrides/options.txt"));
|
||||
}
|
||||
if (m_settings.includeGameConfig) {
|
||||
tmpDir.mkdir("overrides");
|
||||
QFile::copy(gameDir.absoluteFilePath("options.txt"), tmpDir.absoluteFilePath("overrides/options.txt"));
|
||||
}
|
||||
|
||||
if (m_settings.includeModConfigs) {
|
||||
tmpDir.mkdir("overrides");
|
||||
FS::copy copy(m_instance->gameRoot() + "/config", tmpDir.absoluteFilePath("overrides/config"));
|
||||
copy();
|
||||
}
|
||||
if (m_settings.includeModConfigs) {
|
||||
tmpDir.mkdir("overrides");
|
||||
FS::copy copy(gameDir.absoluteFilePath("config"), tmpDir.absoluteFilePath("overrides/config"));
|
||||
copy();
|
||||
}
|
||||
|
||||
setStatus(tr("Zipping modpack..."));
|
||||
|
Loading…
Reference in New Issue
Block a user