Fix shaderpacks folder being hidden on Windows

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2026-01-09 12:41:27 +00:00
parent 3b1a5dd3c0
commit 3e7ef5ee17

View File

@@ -35,7 +35,13 @@ LocalResourceUpdateTask::LocalResourceUpdateTask(QDir index_dir, ModPlatform::In
}
#ifdef Q_OS_WIN32
SetFileAttributesW(index_dir.path().toStdWString().c_str(), FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
std::wstring wpath = index_dir.path().toStdWString();
if (index_dir.dirName().startsWith('.')) {
SetFileAttributesW(wpath.c_str(), FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
} else {
// fix shaderpacks folder being hidden by Prism Launcher 10.0.1
SetFileAttributesW(wpath.c_str(), FILE_ATTRIBUTE_NORMAL);
}
#endif
}