diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2021-11-17 21:08:44 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-17 21:08:44 -0600 |
| commit | b8572f8afcba737182ceb243d14e82a544fb34ee (patch) | |
| tree | 8b534e633f44de128c1d59bff30d6e0bb6c7ef9f | |
| parent | 2d38257878887dca8d460e0235eecc622c1d3fa3 (diff) | |
| parent | 658a1ae624e4757a580543dfab149d868ec7636c (diff) | |
Merge pull request #607 from AttorneyOnline/cache-fix-2
Fix non-image files being loaded as images, fix custom shout button appearing on characters without it enabled
| -rw-r--r-- | src/file_functions.cpp | 3 | ||||
| -rw-r--r-- | src/text_file_functions.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/file_functions.cpp b/src/file_functions.cpp index 37cdc32c..95e9b5f4 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(); diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index aedf3b8a..d873b3c1 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -517,7 +517,7 @@ QString AOApplication::get_sfx_suffix(VPath sound_to_check) QString AOApplication::get_image_suffix(VPath path_to_check, bool static_image) { - QStringList suffixes { "" }; + QStringList suffixes {}; if (!static_image) { suffixes.append({ ".webp", ".apng", ".gif" }); } |
