diff options
author | flow <flowlnlnln@gmail.com> | 2022-06-04 11:01:10 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-06-04 11:02:59 -0300 |
commit | c2a43c6f40d4fd24b5d7e237d13befec17fb3e6b (patch) | |
tree | a220bef2a53cd6764a641893127f123bab048b49 /launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp | |
parent | 1ab00ca8b260e4ff33c4bc1ed5d0167e210de64f (diff) | |
download | PrismLauncher-c2a43c6f40d4fd24b5d7e237d13befec17fb3e6b.tar.gz PrismLauncher-c2a43c6f40d4fd24b5d7e237d13befec17fb3e6b.tar.bz2 PrismLauncher-c2a43c6f40d4fd24b5d7e237d13befec17fb3e6b.zip |
fix: hide .index folder on Windows
Diffstat (limited to 'launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp')
-rw-r--r-- | launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp b/launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp index cbe16567..a3fcd9d9 100644 --- a/launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp +++ b/launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp @@ -22,6 +22,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) { @@ -29,6 +33,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() |