From 2186382c3ea37b60a37228d995c29dc9e95510b6 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 22 Jun 2024 21:00:07 +0900 Subject: [PATCH] FRAMEWORK: fixing an issue where second level subfolders of ES-DE were not correctly placed in the second level --- functions/global.sh | 1 - functions/other_functions.sh | 2 ++ functions/prepare_component.sh | 7 ++++--- rd-submodules/retroarch | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/functions/global.sh b/functions/global.sh index 3c5edbc3..800515a6 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -200,7 +200,6 @@ else fi conf_read - #tmplog_merger # This function is tempry(?) removed # Verify rdhome is where it is supposed to be. if [[ ! -d "$rdhome" ]]; then diff --git a/functions/other_functions.sh b/functions/other_functions.sh index 51c587c5..bc4bd8b0 100644 --- a/functions/other_functions.sh +++ b/functions/other_functions.sh @@ -448,6 +448,8 @@ finit() { esac + log i "\"retrodeck\" folder will be located in \"$rdhome\"" + prepare_component "reset" "retrodeck" # Parse the [paths] section of retrodeck.cfg and set the value of / create all needed folders conf_write # Write the new values to retrodeck.cfg diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index aaf3971f..01258bbf 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -23,7 +23,8 @@ prepare_component() { local current_setting_name=$(get_setting_name "$config_line" "retrodeck") if [[ ! $current_setting_name =~ (rdhome|sdcard) ]]; then # Ignore these locations local current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "paths") - declare -g "$current_setting_name=$rdhome/$(basename $current_setting_value)" + declare -g "$current_setting_name=$rdhome/${current_setting_value#*retrodeck/}" #removes everything until "retrodeck" and adds the actual retrodeck folder + log d "Setting: $current_setting_name=$current_setting_value" if [[ ! $current_setting_name == "logs_folder" ]]; then # Don't create a logs folder normally, we want to maintain the current files exactly to not lose early-install logs. create_dir "$rdhome/$(basename $current_setting_value)" else # Log folder-specific actions @@ -33,8 +34,8 @@ prepare_component() { fi fi done < <(grep -v '^\s*$' $rd_conf | awk '/^\[paths\]/{f=1;next} /^\[/{f=0} f') - create_dir "/var/config/retrodeck/godot" - + create_dir "/var/config/retrodeck/godot" # TODO: what is this for? Can we delete it or add it to the retrodeck.cfg so the folder will be created by the above script? + fi if [[ "$action" == "postmove" ]]; then # Update the paths of any folders that came with the retrodeck folder during a move while read -r config_line; do diff --git a/rd-submodules/retroarch b/rd-submodules/retroarch index fc0418b8..eec4bcca 160000 --- a/rd-submodules/retroarch +++ b/rd-submodules/retroarch @@ -1 +1 @@ -Subproject commit fc0418b8cf75a1500bb8c8633320490b16d39443 +Subproject commit eec4bcca8c9e514467fb62cca4a7b2d12c6a2328