From d08d027db69d91150677073954dc36194fc0d6bc Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 27 Jun 2024 08:52:41 -0400 Subject: [PATCH] Fix compressed file detection for removal validation --- functions/compression.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/compression.sh b/functions/compression.sh index c0d1b169..fed37ab8 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") @@ -45,7 +45,7 @@ compress_game() { rm -f "$(realpath "$file")" fi else - log i "Compressed file ${file%.*}.$compatible_compression_format not found, skipping original file deletion" + log i "Compressed file ${file%.*}.$1 not found, skipping original file deletion" fi fi }