aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/tasks/LocalResourceParse.cpp
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-07-21 11:02:57 +0100
committerGitHub <noreply@github.com>2023-07-21 11:02:57 +0100
commit0be4db30eb98f65543b30d6a2d970ef1df64633b (patch)
tree2135c398f3d01816a0f508dd5e29e155625793cc /launcher/minecraft/mod/tasks/LocalResourceParse.cpp
parent4c6929038159a29c437b30616daa0b2672531e4d (diff)
parent821dd8400b1a27ab1f932200bfa77d7a04edef5d (diff)
downloadPrismLauncher-0be4db30eb98f65543b30d6a2d970ef1df64633b.tar.gz
PrismLauncher-0be4db30eb98f65543b30d6a2d970ef1df64633b.tar.bz2
PrismLauncher-0be4db30eb98f65543b30d6a2d970ef1df64633b.zip
Merge branch 'PrismLauncher:develop' into better-component-installation
Diffstat (limited to 'launcher/minecraft/mod/tasks/LocalResourceParse.cpp')
-rw-r--r--launcher/minecraft/mod/tasks/LocalResourceParse.cpp9
1 files changed, 5 insertions, 4 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;