diff --git a/functions/compression.sh b/functions/compression.sh index ccb5a44c..4b0bcdd8 100644 --- a/functions/compression.sh +++ b/functions/compression.sh @@ -28,7 +28,7 @@ compress_game() { fi if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested - if [[ -f "${file%.*}.$compatible_compression_format" ]]; then + if [[ -f "${file%.*}.$1" ]]; then log i "Performing post-compression file cleanup" if [[ "$file" == *".cue" ]]; then local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file") @@ -38,15 +38,14 @@ compress_game() { log i "Removing file $file_path/$line" rm -f "$file_path/$line" done < <(printf '%s\n' "$cue_bin_files") - log i "Removing file $(realpath $file)" + log i "Removing file $(realpath "$file")" rm -f $(realpath "$file") else - log i "Removing file $(realpath $file)" + log i "Removing file $(realpath "$file")" rm -f "$(realpath "$file")" fi else - log i "Compressed file ${file%.*}.$compatible_compression_format not found, skipping original file deletion" - configurator_generic_dialog "RetroDECK Configurator - RetroDECK: Compression Tool" "A compressed version of the file was not found, skipping deletion." + log i "Compressed file ${file%.*}.$1 not found, skipping original file deletion" fi fi } diff --git a/tools/configurator.sh b/tools/configurator.sh index 2cdb24cd..a860222a 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -587,6 +587,7 @@ configurator_retrodeck_tools_dialog() { "Tool: Remove Empty ROM Folders" ) log i "Configurator: opening \"$choice\" menu" + configurator_generic_dialog "RetroDECK Configurator - Remove Empty ROM Folders" "Before removing any identified empty ROM folders,\nplease make sure your ROM collection is backed up, just in case!" configurator_generic_dialog "RetroDECK Configurator - Remove Empty ROM Folders" "Searching for empty rom folders, please be patient..." find_empty_rom_folders