From f8c2b1a2f06d2c2f99fa9eaa7b2334524823aac5 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Tue, 26 Jul 2022 00:54:11 +0300 Subject: Part 2 of #713: merge get_real_suffixed_path into get_real_path (#717) * Fix get_real_suffixed_path existing, causing the previous PR to not function on suffixed... anything Fix suffixes ignoring a case where a suffixed path is already provided, causing that pre-suffixed filepath to fail to find anything * Fix image paths being used as sound effects and vice versa Better check for sfx and image absolute paths which double-checks the absolute path we got is *actually a valid file format* Co-authored-by: stonedDiscord Co-authored-by: Salanto <62221668+Salanto@users.noreply.github.com> --- include/aoapplication.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/aoapplication.h') diff --git a/include/aoapplication.h b/include/aoapplication.h index c3b7550f..d9b9e89f 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -166,8 +166,7 @@ public: QString get_sfx(QString p_sfx, QString p_misc="", QString p_character=""); QString get_pos_path(const QString& pos, bool desk = false); QString get_case_sensitive_path(QString p_file); - QString get_real_path(const VPath &vpath); - QString get_real_suffixed_path(const VPath &vpath, const QStringList &suffixes); + QString get_real_path(const VPath &vpath, const QStringList &suffixes={""}); void invalidate_lookup_cache(); ////// Functions for reading and writing files ////// -- cgit