fix: use a more robust method of finding metadata indexes

Often times, mods can have their name in different forms, changing one
letter to caps or the other way (e.g. JourneyMaps -> Journeymaps).
This makes it possible to find those as well, which is not perfect by
any means, but should suffice for the majority of cases.
This commit is contained in:
flow
2022-05-18 05:46:07 -03:00
parent 42f8ec5b14
commit 5a1de15332
2 changed files with 80 additions and 36 deletions

View File

@ -24,6 +24,7 @@
#include <QUrl>
#include <QVariant>
struct toml_table_t;
class QDir;
// Mod from launcher/minecraft/mod/Mod.h
@ -31,6 +32,11 @@ class Mod;
namespace Packwiz {
auto getRealIndexName(QDir& index_dir, QString normalized_index_name, bool should_match = false) -> QString;
auto stringEntry(toml_table_t* parent, const char* entry_name) -> QString;
auto intEntry(toml_table_t* parent, const char* entry_name) -> int;
class V1 {
public:
struct Mod {