From 03025119c4a7316e83f5336756d3afc9d1ff82b1 Mon Sep 17 00:00:00 2001 From: Leifa <26681464+TrickyLeifa@users.noreply.github.com> Date: Sat, 6 Jul 2024 18:05:48 +0200 Subject: Improve OS detection and add APPIMAGE support to pathing code (#1003) * Added get_app_path, tweaked pathing to adjust itself for Linux, ... * Added get_app_path * This should be used instead of QCoreApplication::applicationDirPath() * Tweaked pathing to adjust itself for Linux * Append separator to base path * Moved headers where they are needed. (Dunno why they were here.) * Proper pathing for AppImage --- src/text_file_functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/text_file_functions.cpp') diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index 418de47c..35efe20c 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -133,7 +133,7 @@ bool AOApplication::append_to_file(QString p_text, QString p_file, bool make_dir QMultiMap AOApplication::load_demo_logs_list() const { - QString l_log_path = applicationDirPath() + "/logs/"; + QString l_log_path = get_app_path() + "/logs/"; QDir l_log_folder(l_log_path); l_log_folder.setFilter(QDir::NoDotAndDotDot | QDir::Dirs); -- cgit