fix(Inst.Import): don't set managed pack info from imported ZIPs

This prevents the Managed Pack page from showing up even though there's
no way for it to work correctly.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-12-13 13:43:27 -03:00
parent 64585d8f78
commit 5450e0edf3
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469
2 changed files with 6 additions and 2 deletions

View File

@ -361,7 +361,9 @@ bool FlameCreationTask::createInstance()
FS::deletePath(jarmodsPath);
}
instance.setManagedPack("flame", m_managed_id, m_pack.name, m_managed_version_id, m_pack.version);
// Don't add managed info to packs without an ID (most likely imported from ZIP)
if (!m_managed_id.isEmpty())
instance.setManagedPack("flame", m_managed_id, m_pack.name, m_managed_version_id, m_pack.version);
instance.setName(name());
m_mod_id_resolver = new Flame::FileResolvingTask(APPLICATION->network(), m_pack);

View File

@ -217,7 +217,9 @@ bool ModrinthCreationTask::createInstance()
instance.setIconKey("modrinth");
}
instance.setManagedPack("modrinth", m_managed_id, m_managed_name, m_managed_version_id, version());
// Don't add managed info to packs without an ID (most likely imported from ZIP)
if (!m_managed_id.isEmpty())
instance.setManagedPack("modrinth", m_managed_id, m_managed_name, m_managed_version_id, version());
instance.setName(name());
instance.saveNow();