From 12435d3e24eab18a00a21d9e917b0b0a26e952b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jerome=20K=C3=BCttner?= <12213711+jkuettner@users.noreply.github.com> Date: Fri, 7 Jan 2022 17:48:04 +0100 Subject: [PATCH 1/2] Continue if target directory already exists --- AAXtoMP3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AAXtoMP3 b/AAXtoMP3 index d5a80a1..d767858 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -682,8 +682,8 @@ do output_file="${output_directory}/${currentFileNameScheme}.${extension}" if [[ "${noclobber}" = "1" ]] && [[ -d "${output_directory}" ]]; then - log "Noclobber enabled but directory '${output_directory}' exists. Exiting to avoid overwriting" - exit 0 + log "Noclobber enabled but directory '${output_directory}' exists. Skipping to avoid overwriting" + continue fi mkdir -p "${output_directory}" From 45fd0d4852644343f854e453359db234d33533a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jerome=20K=C3=BCttner?= <12213711+jkuettner@users.noreply.github.com> Date: Fri, 7 Jan 2022 20:58:54 +0100 Subject: [PATCH 2/2] remove temp metadata_file on continue --- AAXtoMP3 | 1 + 1 file changed, 1 insertion(+) diff --git a/AAXtoMP3 b/AAXtoMP3 index d767858..9c0b8a8 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -683,6 +683,7 @@ do if [[ "${noclobber}" = "1" ]] && [[ -d "${output_directory}" ]]; then log "Noclobber enabled but directory '${output_directory}' exists. Skipping to avoid overwriting" + rm -f "${metadata_file}" continue fi mkdir -p "${output_directory}"