During compression checks, only look for files in folders that exist

This commit is contained in:
icenine451 2025-03-19 14:21:09 -04:00
parent 2c296b6fdb
commit d423ed7fe7

View file

@ -163,6 +163,7 @@ find_compatible_games() {
while IFS= read -r system; do
log d "Checking system: $system"
if [[ -d "$roms_folder/$system" ]]; then
local compression_candidates
compression_candidates=$(find "$roms_folder/$system" -type f -not -iname "*.txt")
if [[ -n "$compression_candidates" ]]; then
@ -215,6 +216,9 @@ find_compatible_games() {
esac
done < <(printf '%s\n' "$compression_candidates")
fi
else
log i "Rom folder for $system is missing, skipping"
fi
done < <(printf '%s\n' "$compressable_systems_list")
log d "Compatible games have been written to $output_file"