aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/tasks
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-07-22 11:26:02 +0100
committerGitHub <noreply@github.com>2023-07-22 11:26:02 +0100
commit57430fd189aed592a170d597de61b3acabaaa43d (patch)
treeb3727db40fdea31d24541c0c8181c43df13e774c /launcher/minecraft/mod/tasks
parentec85266860b7503b24ff3840fb6bf74588acc7c8 (diff)
parent6ffcfcd7e9d96ae0a2846d1cf23b27425a838709 (diff)
downloadPrismLauncher-57430fd189aed592a170d597de61b3acabaaa43d.tar.gz
PrismLauncher-57430fd189aed592a170d597de61b3acabaaa43d.tar.bz2
PrismLauncher-57430fd189aed592a170d597de61b3acabaaa43d.zip
Merge branch 'develop' into better-launch
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/minecraft/mod/tasks')
-rw-r--r--launcher/minecraft/mod/tasks/LocalResourceParse.cpp9
-rw-r--r--launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp2
2 files changed, 6 insertions, 5 deletions
diff --git a/launcher/minecraft/mod/tasks/LocalResourceParse.cpp b/launcher/minecraft/mod/tasks/LocalResourceParse.cpp
index 4d760df2..0894049c 100644
--- a/launcher/minecraft/mod/tasks/LocalResourceParse.cpp
+++ b/launcher/minecraft/mod/tasks/LocalResourceParse.cpp
@@ -44,7 +44,11 @@ static const QMap<PackedResourceType, QString> s_packed_type_names = {
namespace ResourceUtils {
PackedResourceType identify(QFileInfo file){
if (file.exists() && file.isFile()) {
- if (ResourcePackUtils::validate(file)) {
+ if (ModUtils::validate(file)) {
+ // mods can contain resource and data packs so they must be tested first
+ qDebug() << file.fileName() << "is a mod";
+ return PackedResourceType::Mod;
+ } else if (ResourcePackUtils::validate(file)) {
qDebug() << file.fileName() << "is a resource pack";
return PackedResourceType::ResourcePack;
} else if (TexturePackUtils::validate(file)) {
@@ -53,9 +57,6 @@ PackedResourceType identify(QFileInfo file){
} else if (DataPackUtils::validate(file)) {
qDebug() << file.fileName() << "is a data pack";
return PackedResourceType::DataPack;
- } else if (ModUtils::validate(file)) {
- qDebug() << file.fileName() << "is a mod";
- return PackedResourceType::Mod;
} else if (WorldSaveUtils::validate(file)) {
qDebug() << file.fileName() << "is a world save";
return PackedResourceType::WorldSave;
diff --git a/launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp b/launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp
index 3677a1dc..ef353c70 100644
--- a/launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp
+++ b/launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp
@@ -103,7 +103,7 @@ void ModFolderLoadTask::executeTask()
while (iter.hasNext()) {
auto mod = iter.next().value();
if (mod->status() == ModStatus::NotInstalled) {
- mod->destroy(m_index_dir, false);
+ mod->destroy(m_index_dir, false, false);
iter.remove();
}
}