aboutsummaryrefslogtreecommitdiff
path: root/launcher/DesktopServices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/DesktopServices.cpp')
-rw-r--r--launcher/DesktopServices.cpp4
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())); };