Ignore .index in ExportPackDialog

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2024-10-28 11:01:30 +00:00
parent 6a6fe60a5b
commit 1809858fc7
3 changed files with 9 additions and 3 deletions

View File

@ -1227,6 +1227,11 @@ std::shared_ptr<ShaderPackFolderModel> MinecraftInstance::shaderPackList()
return m_shader_pack_list;
}
QList<std::shared_ptr<ResourceFolderModel>> MinecraftInstance::resourceLists()
{
return { loaderModList(), coreModList(), nilModList(), resourcePackList(), texturePackList(), shaderPackList() };
}
std::shared_ptr<WorldList> MinecraftInstance::worldList()
{
if (!m_world_list) {

View File

@ -116,6 +116,7 @@ class MinecraftInstance : public BaseInstance {
std::shared_ptr<ResourcePackFolderModel> resourcePackList();
std::shared_ptr<TexturePackFolderModel> texturePackList();
std::shared_ptr<ShaderPackFolderModel> shaderPackList();
QList<std::shared_ptr<ResourceFolderModel>> resourceLists();
std::shared_ptr<WorldList> worldList();
std::shared_ptr<GameOptions> gameOptionsModel();

View File

@ -88,9 +88,9 @@ ExportPackDialog::ExportPackDialog(InstancePtr instance, QWidget* parent, ModPla
MinecraftInstance* mcInstance = dynamic_cast<MinecraftInstance*>(instance.get());
if (mcInstance) {
const QDir index = mcInstance->loaderModList()->indexDir();
if (index.exists())
proxy->ignoreFilesWithPath().insert(root.relativeFilePath(index.absolutePath()));
for (auto& resourceModel : mcInstance->resourceLists())
if (resourceModel->indexDir().exists())
proxy->ignoreFilesWithPath().insert(root.relativeFilePath(resourceModel->indexDir().absolutePath()));
}
ui->files->setModel(proxy);