diff options
Diffstat (limited to 'src/file_functions.cpp')
| -rw-r--r-- | src/file_functions.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/file_functions.cpp b/src/file_functions.cpp index 92e598f8..fef34f54 100644 --- a/src/file_functions.cpp +++ b/src/file_functions.cpp @@ -3,7 +3,9 @@ bool file_exists(QString file_path) { if (file_path.isEmpty()) + { return false; + } QFileInfo check_file(file_path); @@ -13,7 +15,9 @@ bool file_exists(QString file_path) bool dir_exists(QString dir_path) { if (dir_path == "") - return false; + { + return false; + } QDir check_dir(dir_path); @@ -29,13 +33,15 @@ bool exists(QString p_path) QString get_base_path() { - QString base_path = ""; + QString base_path; #ifdef ANDROID QString sdcard_storage = getenv("SECONDARY_STORAGE"); - if (dir_exists(sdcard_storage + "/base/")) { + if (dir_exists(sdcard_storage + "/base/")) + { base_path = sdcard_storage + "/base/"; } - else { + else + { QString external_storage = getenv("EXTERNAL_STORAGE"); base_path = external_storage + "/base/"; } |
