aboutsummaryrefslogtreecommitdiff
path: root/src/file_functions.cpp
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2021-12-18 22:34:04 -0600
committeroldmud0 <oldmud0@users.noreply.github.com>2021-12-18 22:34:04 -0600
commitb0e9f8dbe57df5e688d9583987d7e378eebd72b4 (patch)
tree18824b6a05fddfa71e4c1240023fc916d8ef4790 /src/file_functions.cpp
parentcf12168ebd426d7658d7f7021c47be519caa215a (diff)
parent641cca65044e41e49e5a871f0d60138b61c1bab3 (diff)
Merge branch 'master' into feature/http-ms
Diffstat (limited to 'src/file_functions.cpp')
-rw-r--r--src/file_functions.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/file_functions.cpp b/src/file_functions.cpp
index e64a46b..95e9b5f 100644
--- a/src/file_functions.cpp
+++ b/src/file_functions.cpp
@@ -2,6 +2,9 @@
bool file_exists(QString file_path)
{
+ if (file_path.isEmpty())
+ return false;
+
QFileInfo check_file(file_path);
return check_file.exists() && check_file.isFile();
@@ -9,6 +12,9 @@ bool file_exists(QString file_path)
bool dir_exists(QString dir_path)
{
+ if (dir_path == "")
+ return false;
+
QDir check_dir(dir_path);
return check_dir.exists();