From 189dcb23247458353b9e47957c0246b820e620dc Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 19 Mar 2024 22:54:27 +0100 Subject: [PATCH] LOGGER: fixed path not being created --- functions/global.sh | 3 +-- functions/logger.sh | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/functions/global.sh b/functions/global.sh index 40f4fbcd..e5acdcbc 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -32,8 +32,7 @@ default_splash_file="/var/config/ES-DE/resources/graphics/splash-orig.svg" multi_user_emulator_config_dirs="$emuconfigs/defaults/retrodeck/reference_lists/multi_user_emulator_config_dirs.cfg" # A list of emulator config folders that can be safely linked/unlinked entirely in multi-user mode rd_es_themes="/app/share/es-de/themes" # The directory where themes packaged with RetroDECK are stored lockfile="/var/config/retrodeck/.lock" # Where the lockfile is located -default_sd="/run/media/mmcblk0p1" # Steam Deck SD default path -rd_logs_folder="/var/config/retrodeck/logs/" # A static location for RetroDECK logs to be written +default_sd="/run/media/mmcblk0p1" # Steam Deck SD default path # A static location for RetroDECK logs to be written hard_version="$(cat '/app/retrodeck/version')" # hardcoded version (in the readonly filesystem) rd_repo="https://github.com/XargonWan/RetroDECK" # The URL of the main RetroDECK GitHub repo es_themes_list="https://gitlab.com/es-de/themes/themes-list/-/raw/master/themes.json" # The URL of the ES-DE 2.0 themes list diff --git a/functions/logger.sh b/functions/logger.sh index 6e0d37d6..8a5ed407 100755 --- a/functions/logger.sh +++ b/functions/logger.sh @@ -14,6 +14,12 @@ # log_init=true # fi +rd_logs_folder="$rdhome/logs" +if [ ! -d "$rd_logs_folder" ]; then + # this is a one off otherwise it would be logging every time this function is called + create_dir "$rd_logs_folder" +fi + log() { # exec > >(tee "$logs_folder/retrodeck.log") 2>&1 # this is broken, creates strange artifacts and corrupts the log file