fix: handling around disabled mods

Don't update disabled mods to prevent mod duplication. Also, chop
filename in the metadata with a '.disabled'.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow committed 2022-07-17 11:33:43 -03:00
1 parent a7648d60ce
commit 5f75e531e6
5 files changed
+22 -4

No files matched your search

@@ -455,6 +455,8 @@ void EnsureMetadataTask::modrinthCallback(ModPlatform::IndexedPack& pack, ModPla
{
// Prevent file name mismatch
ver.fileName = mod.fileinfo().fileName();
if (ver.fileName.endsWith(".disabled"))
ver.fileName.chop(9);
QDir tmp_index_dir(m_index_dir);
@@ -487,6 +489,8 @@ void EnsureMetadataTask::flameCallback(ModPlatform::IndexedPack& pack, ModPlatfo
try {
// Prevent file name mismatch
ver.fileName = mod.fileinfo().fileName();
if (ver.fileName.endsWith(".disabled"))
ver.fileName.chop(9);
QDir tmp_index_dir(m_index_dir);