diff options
| author | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-17 14:23:37 +0300 |
|---|---|---|
| committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-17 14:23:37 +0300 |
| commit | 4a1d85f99913d0bacf8cdd118c81401378c758b6 (patch) | |
| tree | e8389ba64e1b1a303545f1dad242c9a9124ddca9 /launcher/DesktopServices.cpp | |
| parent | 939a2d67ed75be714e9f3b1b918250d006b3860a (diff) | |
| parent | 85f36ebed7e1295547cd2324d1baf7834be89c31 (diff) | |
| download | PrismLauncher-4a1d85f99913d0bacf8cdd118c81401378c758b6.tar.gz PrismLauncher-4a1d85f99913d0bacf8cdd118c81401378c758b6.tar.bz2 PrismLauncher-4a1d85f99913d0bacf8cdd118c81401378c758b6.zip | |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into develop
Diffstat (limited to 'launcher/DesktopServices.cpp')
| -rw-r--r-- | launcher/DesktopServices.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/launcher/DesktopServices.cpp b/launcher/DesktopServices.cpp index 71048734..004e5e08 100644 --- a/launcher/DesktopServices.cpp +++ b/launcher/DesktopServices.cpp @@ -96,12 +96,12 @@ bool IndirectOpen(T callable, qint64* pid_forked = nullptr) #endif namespace DesktopServices { -bool openDirectory(const QString& path, bool ensureExists) +bool openDirectory(const QString& path, [[maybe_unused]] bool ensureExists) { qDebug() << "Opening directory" << path; QDir parentPath; QDir dir(path); - if (!dir.exists()) { + if (ensureExists && !dir.exists()) { parentPath.mkpath(dir.absolutePath()); } auto f = [&]() { return QDesktopServices::openUrl(QUrl::fromLocalFile(dir.absolutePath())); }; |
