aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft
diff options
context:
space:
mode:
authorEzekiel Smith <ezekielsmith@protonmail.com>2022-06-14 23:58:35 +1000
committerGitHub <noreply@github.com>2022-06-14 23:58:35 +1000
commite6b1a1fa764ba35cbdc753bdfd9c0a7ffc0291ab (patch)
tree2603ffe995cb65eb5eb3b9175f8d129704729b97 /launcher/minecraft
parent3e8d450741a476d58ecc584944b88947dbfb1ee3 (diff)
parentc2a43c6f40d4fd24b5d7e237d13befec17fb3e6b (diff)
downloadPrismLauncher-e6b1a1fa764ba35cbdc753bdfd9c0a7ffc0291ab.tar.gz
PrismLauncher-e6b1a1fa764ba35cbdc753bdfd9c0a7ffc0291ab.tar.bz2
PrismLauncher-e6b1a1fa764ba35cbdc753bdfd9c0a7ffc0291ab.zip
Merge pull request #716 from flowln/mod_perma_2
Hide index folder on Windows
Diffstat (limited to 'launcher/minecraft')
-rw-r--r--launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp b/launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp
index 018bc6e3..1bdecb8c 100644
--- a/launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp
+++ b/launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp
@@ -23,6 +23,10 @@
#include "FileSystem.h"
#include "minecraft/mod/MetadataHandler.h"
+#ifdef Q_OS_WIN32
+#include <windows.h>
+#endif
+
LocalModUpdateTask::LocalModUpdateTask(QDir index_dir, ModPlatform::IndexedPack& mod, ModPlatform::IndexedVersion& mod_version)
: m_index_dir(index_dir), m_mod(mod), m_mod_version(mod_version)
{
@@ -30,6 +34,10 @@ LocalModUpdateTask::LocalModUpdateTask(QDir index_dir, ModPlatform::IndexedPack&
if (!FS::ensureFolderPathExists(index_dir.path())) {
emitFailed(QString("Unable to create index for mod %1!").arg(m_mod.name));
}
+
+#ifdef Q_OS_WIN32
+ SetFileAttributesA(index_dir.path().toStdString().c_str(), FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
+#endif
}
void LocalModUpdateTask::executeTask()