From 7f62bd089b019acd2250b92d9191dfd8f62ad6c8 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Wed, 26 Jun 2024 12:43:56 -0400 Subject: [PATCH] Add check for existing compressed format when building compressable files list --- functions/compression.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/compression.sh b/functions/compression.sh index d33f5a2d..ccb5a44c 100644 --- a/functions/compression.sh +++ b/functions/compression.sh @@ -155,19 +155,19 @@ find_compatible_games() { do local compatible_compression_format=$(find_compatible_compression_format "$game") if [[ $compression_format == "chd" ]]; then - if [[ $compatible_compression_format == "chd" ]]; then + if [[ $compatible_compression_format == "chd" && ! -f "$(echo ${game%.*}.chd)" ]]; then all_compressable_games=("${all_compressable_games[@]}" "$game") compressable_games_list=("${compressable_games_list[@]}" "false" "${game#$roms_folder}" "$game") echo "${game}"^"$compatible_compression_format" >> "$godot_compression_compatible_games" fi elif [[ $compression_format == "zip" ]]; then - if [[ $compatible_compression_format == "zip" ]]; then + if [[ $compatible_compression_format == "zip" && ! -f "$(echo ${game%.*}.zip)" ]]; then all_compressable_games=("${all_compressable_games[@]}" "$game") compressable_games_list=("${compressable_games_list[@]}" "false" "${game#$roms_folder}" "$game") echo "${game}"^"$compatible_compression_format" >> "$godot_compression_compatible_games" fi elif [[ $compression_format == "rvz" ]]; then - if [[ $compatible_compression_format == "rvz" ]]; then + if [[ $compatible_compression_format == "rvz" && ! -f "$(echo ${game%.*}.rvz)" ]]; then all_compressable_games=("${all_compressable_games[@]}" "$game") compressable_games_list=("${compressable_games_list[@]}" "false" "${game#$roms_folder}" "$game") echo "${game}"^"$compatible_compression_format" >> "$godot_compression_compatible_games"