Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(blockedmods): Track and use targetFolder for blocked files #571

Merged
merged 1 commit into from Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion launcher/modplatform/flame/FlameInstanceCreationTask.cpp
Expand Up @@ -419,6 +419,7 @@ void FlameCreationTask::idResolverSucceeded(QEventLoop& loop)
blocked_mod.hash = result.hash;
blocked_mod.matched = false;
blocked_mod.localPath = "";
blocked_mod.targetFolder = result.targetFolder;

blocked_mods.append(blocked_mod);

Expand Down Expand Up @@ -464,7 +465,7 @@ void FlameCreationTask::copyBlockedMods(QList<BlockedMod> const& blocked_mods)
continue;
}

auto dest_path = FS::PathCombine(m_stagingPath, "minecraft", "mods", mod.name);
auto dest_path = FS::PathCombine(m_stagingPath, "minecraft", mod.targetFolder, mod.name);

setStatus(tr("Copying Blocked Mods (%1 out of %2 are done)").arg(QString::number(i), QString::number(total)));

Expand Down
3 changes: 2 additions & 1 deletion launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
Expand Up @@ -195,6 +195,7 @@ void PackInstallTask::onResolveModsSucceeded()
blocked_mod.hash = results_file.hash;
blocked_mod.matched = false;
blocked_mod.localPath = "";
blocked_mod.targetFolder = results_file.targetFolder;

m_blocked_mods.append(blocked_mod);

Expand Down Expand Up @@ -366,7 +367,7 @@ void PackInstallTask::copyBlockedMods()
continue;
}

auto dest_path = FS::PathCombine(m_stagingPath, ".minecraft", "mods", mod.name);
auto dest_path = FS::PathCombine(m_stagingPath, ".minecraft", mod.targetFolder, mod.name);

setStatus(tr("Copying Blocked Mods (%1 out of %2 are done)").arg(QString::number(i), QString::number(total)));

Expand Down
1 change: 1 addition & 0 deletions launcher/ui/dialogs/BlockedModsDialog.h
Expand Up @@ -41,6 +41,7 @@ struct BlockedMod {
QString hash;
bool matched;
QString localPath;
QString targetFolder;
};

QT_BEGIN_NAMESPACE
Expand Down