Fix it removing the renamed file

This commit is contained in:
Joren 2025-03-09 17:27:51 +01:00
parent 32e79c46d8
commit e322e47a8c
Signed by: Joren
GPG Key ID: 280E33DFBC0F1B55

View File

@ -87,9 +87,15 @@ find . -type f -regextype posix-extended -regex ".*\([0-9]\)\.flac" | while read
mv "$best_file" "$orig_file" mv "$best_file" "$orig_file"
fi fi
fi fi
filtered_candidates=()
for file in "${candidates[@]}"; do for file in "${candidates[@]}"; do
if [[ "$file" != "$best_file" && "$file" != "$orig_file" ]]; then
filtered_candidates+=("$file")
fi
done
for file in "${filtered_candidates[@]}"; do
if [[ "$file" != "$best_file" ]]; then if [[ "$file" != "$best_file" ]]; then
log " * Would delete: $file" log " * Would delete: $file"
if $ARMED; then if $ARMED; then
@ -98,9 +104,10 @@ find . -type f -regextype posix-extended -regex ".*\([0-9]\)\.flac" | while read
fi fi
done done
echo "" | tee -a "$LOGFILE" echo "" | tee -a "$LOGFILE"
done done
log "Cleanup completed at $(date)" log "Cleanup completed at $(date)"