aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-08-28 17:25:07 +0100
committerTheKodeToad <TheKodeToad@proton.me>2023-08-28 17:25:07 +0100
commit0e67686295e25a3dda587e4955837e6201ae23e8 (patch)
treec9e31a7cf78fc7b6822c4ac71fee1200ac1b90db /launcher
parente98bca47493f53b324d0ac7fd9eac9386c30be23 (diff)
downloadPrismLauncher-0e67686295e25a3dda587e4955837e6201ae23e8.tar.gz
PrismLauncher-0e67686295e25a3dda587e4955837e6201ae23e8.tar.bz2
PrismLauncher-0e67686295e25a3dda587e4955837e6201ae23e8.zip
Hide index folder in pack export dialog
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher')
-rw-r--r--launcher/FileIgnoreProxy.cpp5
-rw-r--r--launcher/ui/dialogs/ExportPackDialog.cpp3
2 files changed, 2 insertions, 6 deletions
diff --git a/launcher/FileIgnoreProxy.cpp b/launcher/FileIgnoreProxy.cpp
index 4c8c64c7..df06c3c7 100644
--- a/launcher/FileIgnoreProxy.cpp
+++ b/launcher/FileIgnoreProxy.cpp
@@ -267,10 +267,7 @@ bool FileIgnoreProxy::filterAcceptsRow(int sourceRow, const QModelIndex& sourceP
bool FileIgnoreProxy::ignoreFile(QFileInfo fileInfo) const
{
- auto fileName = fileInfo.fileName();
- auto path = relPath(fileInfo.absoluteFilePath());
- return std::any_of(m_ignoreFiles.cbegin(), m_ignoreFiles.cend(), [fileName](auto iFileName) { return fileName == iFileName; }) ||
- m_ignoreFilePaths.covers(path);
+ return m_ignoreFiles.contains(fileInfo.fileName()) || m_ignoreFilePaths.covers(relPath(fileInfo.absoluteFilePath()));
}
bool FileIgnoreProxy::filterFile(const QString& fileName) const
diff --git a/launcher/ui/dialogs/ExportPackDialog.cpp b/launcher/ui/dialogs/ExportPackDialog.cpp
index b0558df7..5af24b1b 100644
--- a/launcher/ui/dialogs/ExportPackDialog.cpp
+++ b/launcher/ui/dialogs/ExportPackDialog.cpp
@@ -81,10 +81,9 @@ ExportPackDialog::ExportPackDialog(InstancePtr instance, QWidget* parent, ModPla
MinecraftInstance* mcInstance = dynamic_cast<MinecraftInstance*>(instance.get());
if (mcInstance) {
- mcInstance->loaderModList()->update();
const QDir index = mcInstance->loaderModList()->indexDir();
if (index.exists())
- proxy->blockedPaths().insert(root.relativeFilePath(index.absolutePath()));
+ proxy->ignoreFilesWithPath().insert(root.relativeFilePath(index.absolutePath()));
}
ui->files->setModel(proxy);