diff options
author | dada513 <dada513@protonmail.com> | 2022-05-15 21:54:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-15 21:54:46 +0200 |
commit | 550d6a6a9b358453a9dbb3aebc910885b365f65d (patch) | |
tree | 54fbf94dd0b463517672880074274086754eca50 /launcher/InstanceList.cpp | |
parent | 9be8160bf27cbb2da7f28ba67bb10d4a4db21a0c (diff) | |
parent | 527fa7ba9cb4e29277acdbedf4880f6fc2255a8b (diff) | |
download | PrismLauncher-550d6a6a9b358453a9dbb3aebc910885b365f65d.tar.gz PrismLauncher-550d6a6a9b358453a9dbb3aebc910885b365f65d.tar.bz2 PrismLauncher-550d6a6a9b358453a9dbb3aebc910885b365f65d.zip |
Merge pull request #547 from kthchew/feature/hidden-temp
Diffstat (limited to 'launcher/InstanceList.cpp')
-rw-r--r-- | launcher/InstanceList.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/launcher/InstanceList.cpp b/launcher/InstanceList.cpp index 6e37e3d8..847d897e 100644 --- a/launcher/InstanceList.cpp +++ b/launcher/InstanceList.cpp @@ -38,6 +38,10 @@ #include "ExponentialSeries.h" #include "WatchLock.h" +#ifdef Q_OS_WIN32 +#include <Windows.h> +#endif + const static int GROUP_FILE_FORMAT_VERSION = 1; InstanceList::InstanceList(SettingsObjectPtr settings, const QString & instDir, QObject *parent) @@ -851,13 +855,18 @@ Task * InstanceList::wrapInstanceTask(InstanceTask * task) QString InstanceList::getStagedInstancePath() { QString key = QUuid::createUuid().toString(); - QString relPath = FS::PathCombine("_LAUNCHER_TEMP/" , key); + QString tempDir = ".LAUNCHER_TEMP/"; + QString relPath = FS::PathCombine(tempDir, key); QDir rootPath(m_instDir); auto path = FS::PathCombine(m_instDir, relPath); if(!rootPath.mkpath(relPath)) { return QString(); } +#ifdef Q_OS_WIN32 + auto tempPath = FS::PathCombine(m_instDir, tempDir); + SetFileAttributesA(tempPath.toStdString().c_str(), FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED); +#endif return path; } |