From 328b3982cf037fb08315ec369fc99209a10c2e4d Mon Sep 17 00:00:00 2001 From: icenine451 Date: Wed, 19 Mar 2025 11:12:33 -0400 Subject: [PATCH] Fix empty rom folder cleanup handling of paths with spaces --- functions/configurator_functions.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/functions/configurator_functions.sh b/functions/configurator_functions.sh index 2d68829c..78dd78bb 100644 --- a/functions/configurator_functions.sh +++ b/functions/configurator_functions.sh @@ -23,14 +23,14 @@ find_empty_rom_folders() { if [[ $count -eq 0 ]]; then # Directory is empty - empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath $dir)") - all_empty_folders=("${all_empty_folders[@]}" "$(realpath $dir)") - echo "$(realpath $dir)" >> "$godot_empty_roms_folders" # Godot data transfer temp file + empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath "$dir")") + all_empty_folders=("${all_empty_folders[@]}" "$(realpath "$dir")") + echo "$(realpath "$dir")" >> "$godot_empty_roms_folders" # Godot data transfer temp file elif [[ $count -eq 1 ]] && [[ "$(basename "${files[0]}")" == "systeminfo.txt" ]]; then # Directory contains only systeminfo.txt - empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath $dir)") - all_empty_folders=("${all_empty_folders[@]}" "$(realpath $dir)") - echo "$(realpath $dir)" >> "$godot_empty_roms_folders" # Godot data transfer temp file + empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath "$dir")") + all_empty_folders=("${all_empty_folders[@]}" "$(realpath "$dir")") + echo "$(realpath "$dir")" >> "$godot_empty_roms_folders" # Godot data transfer temp file elif [[ $count -eq 2 ]] && [[ "$files" =~ "systeminfo.txt" ]]; then contains_helper_file="false" for helper_file in "${all_helper_files[@]}" # Compare helper file list to dir file list @@ -42,9 +42,9 @@ find_empty_rom_folders() { done if [[ "$contains_helper_file" == "true" ]]; then # Directory contains only systeminfo.txt and a helper file - empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath $dir)") - all_empty_folders=("${all_empty_folders[@]}" "$(realpath $dir)") - echo "$(realpath $dir)" >> "$godot_empty_roms_folders" # Godot data transfer temp file + empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath "$dir")") + all_empty_folders=("${all_empty_folders[@]}" "$(realpath "$dir")") + echo "$(realpath "$dir")" >> "$godot_empty_roms_folders" # Godot data transfer temp file fi fi done