FRAMEWORK: fixing an issue where second level subfolders of ES-DE were not correctly placed in the second level

This commit is contained in:
XargonWan 2024-06-22 21:00:07 +09:00
parent b5aa72632c
commit 2186382c3e
4 changed files with 7 additions and 5 deletions

View file

@ -200,7 +200,6 @@ else
fi fi
conf_read conf_read
#tmplog_merger # This function is tempry(?) removed
# Verify rdhome is where it is supposed to be. # Verify rdhome is where it is supposed to be.
if [[ ! -d "$rdhome" ]]; then if [[ ! -d "$rdhome" ]]; then

View file

@ -448,6 +448,8 @@ finit() {
esac 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 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 conf_write # Write the new values to retrodeck.cfg

View file

@ -23,7 +23,8 @@ prepare_component() {
local current_setting_name=$(get_setting_name "$config_line" "retrodeck") local current_setting_name=$(get_setting_name "$config_line" "retrodeck")
if [[ ! $current_setting_name =~ (rdhome|sdcard) ]]; then # Ignore these locations if [[ ! $current_setting_name =~ (rdhome|sdcard) ]]; then # Ignore these locations
local current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "paths") 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. 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)" create_dir "$rdhome/$(basename $current_setting_value)"
else # Log folder-specific actions else # Log folder-specific actions
@ -33,8 +34,8 @@ prepare_component() {
fi fi
fi fi
done < <(grep -v '^\s*$' $rd_conf | awk '/^\[paths\]/{f=1;next} /^\[/{f=0} f') 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 fi
if [[ "$action" == "postmove" ]]; then # Update the paths of any folders that came with the retrodeck folder during a move 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 while read -r config_line; do

@ -1 +1 @@
Subproject commit fc0418b8cf75a1500bb8c8633320490b16d39443 Subproject commit eec4bcca8c9e514467fb62cca4a7b2d12c6a2328