From 658a1ae624e4757a580543dfab149d868ec7636c Mon Sep 17 00:00:00 2001 From: in1tiate Date: Mon, 15 Nov 2021 17:03:36 -0600 Subject: [PATCH] Add an explicit check for empty string to dir_exists --- src/file_functions.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/file_functions.cpp b/src/file_functions.cpp index 37cdc32..95e9b5f 100644 --- a/src/file_functions.cpp +++ b/src/file_functions.cpp @@ -12,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();