diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2021-06-19 16:58:24 +0200 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2021-06-19 16:58:24 +0200 |
commit | dc835fa2a9e7d051a50677721fcbbd84ea1e763a (patch) | |
tree | 0d221b5236b60dcaf022a4a3406b1f9c58643900 /src/util | |
parent | 5b26d604f139f1623872fc19083df30ac7d2cc70 (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.cpp | 5 |
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)) { |