From 8a26bd37d2793e7e2331fda80c043d718125d1f7 Mon Sep 17 00:00:00 2001 From: fabian Date: Sun, 1 Feb 2026 17:10:43 +0100 Subject: [PATCH] avoid ConcurrentModificationException-esque error by saving directory names beforehand --- scripts/postTreatmentAudible.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/postTreatmentAudible.sh b/scripts/postTreatmentAudible.sh index db2c95b..788e691 100755 --- a/scripts/postTreatmentAudible.sh +++ b/scripts/postTreatmentAudible.sh @@ -2,7 +2,11 @@ set -euo pipefail /sync/scripts/escapeFilenames.sh . _ +declare -a dirs=(); for d in *; do + dirs+=($d); +done +for d in "${dirs[@]}"; do cd "$d"; /sync/scripts/escapeFilenames.sh Chapter Kapitel /sync/scripts/reencode_m4a.sh -map;