summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2021-06-19 16:58:24 +0200
committerDaniel Schürmann <daschuer@mixxx.org>2021-06-19 16:58:24 +0200
commitdc835fa2a9e7d051a50677721fcbbd84ea1e763a (patch)
tree0d221b5236b60dcaf022a4a3406b1f9c58643900 /src/util
parent5b26d604f139f1623872fc19083df30ac7d2cc70 (diff)
User can't select an non existing File or Dir in the open file dialog. Abort.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/sandbox.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/sandbox.cpp b/src/util/sandbox.cpp
index 3ec2ed752e..87a8ee7cd4 100644
--- a/src/util/sandbox.cpp
+++ b/src/util/sandbox.cpp
@@ -73,6 +73,11 @@ bool Sandbox::askForAccess(const QString& path) {
}
QFileInfo info(path);
+ if (info.exists()) {
+ // we cannot grand access to a not existing file
+ return false;
+ }
+
// We always want read/write access because we wouldn't want to have to
// re-ask for access in the future if we need to write.
if (canAccessFile(info)) {