diff options
author | seth <getchoo@tuta.io> | 2023-07-14 00:16:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-14 00:16:43 -0400 |
commit | 3099a70edc4a8a928247efd032fdd43988cd1e0a (patch) | |
tree | 4d6baee58681459a2bab690d028bd6e1c0f50800 /launcher/minecraft/mod/tasks | |
parent | 5d10045cc823037709d33034663d177af6446f43 (diff) | |
parent | cde85947c7dd4c2508938490789fef60cd464828 (diff) | |
download | PrismLauncher-3099a70edc4a8a928247efd032fdd43988cd1e0a.tar.gz PrismLauncher-3099a70edc4a8a928247efd032fdd43988cd1e0a.tar.bz2 PrismLauncher-3099a70edc4a8a928247efd032fdd43988cd1e0a.zip |
Merge pull request #1335 from Ryex/fix/gh-1322-old-zip-mods-in-wrong-place
fix(flame install): don't assume .zip is a resource pack. default to mod
Diffstat (limited to 'launcher/minecraft/mod/tasks')
-rw-r--r-- | launcher/minecraft/mod/tasks/LocalResourceParse.cpp | 9 |
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; |