diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-15 16:34:33 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-15 16:34:33 -0700 |
commit | fc656b6927914d64077e23690859996447908c57 (patch) | |
tree | 8d6724cbbaa453d71d77acd00429bd1541d32840 /launcher/minecraft/mod/tasks | |
parent | b1ffc8ddab7d9aff10b6195a75e6e58c43b233ca (diff) | |
download | PrismLauncher-fc656b6927914d64077e23690859996447908c57.tar.gz PrismLauncher-fc656b6927914d64077e23690859996447908c57.tar.bz2 PrismLauncher-fc656b6927914d64077e23690859996447908c57.zip |
fix: when given a remost resource, download and identify it before import.
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/mod/tasks')
-rw-r--r-- | launcher/minecraft/mod/tasks/LocalResourceParse.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/launcher/minecraft/mod/tasks/LocalResourceParse.cpp b/launcher/minecraft/mod/tasks/LocalResourceParse.cpp index 4d760df2..ef052afc 100644 --- a/launcher/minecraft/mod/tasks/LocalResourceParse.cpp +++ b/launcher/minecraft/mod/tasks/LocalResourceParse.cpp @@ -44,7 +44,10 @@ 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)) { + 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 +56,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; |