Fix incorrect use of 'break'.
authorAndrew Strong <andrew.david.strong@gmail.com>
Fri, 11 Sep 2015 00:46:32 +0000 (10:46 +1000)
committerAndrew Strong <andrew.david.strong@gmail.com>
Fri, 11 Sep 2015 00:46:32 +0000 (10:46 +1000)
Thanks to Reuben Thomas for the bug report and fix which closes Issue 6:

    http://abcde.einval.com/bugzilla/show_bug.cgi?id=6

abcde
changelog

diff --git a/abcde b/abcde
index 991df79..a3a6c76 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -4873,24 +4873,25 @@ fi
 #BACK
 if [ "$BATCHNORM" = "y" ] || [ "$NOGAP" = "y" ]; then
        read GOAHEAD # For blocking - will contain either "NO" or "NEXTTRACK"
-       if [ "$GOAHEAD" = "NO" ]; then break; fi
-       for LASTTRACK in $TRACKQUEUE; do :; done
-       if checkstatus readtrack-$LASTTRACK; then
-               if [ "$DONORMALIZE" = "y" ] && [ "$BATCHNORM" = "y" ]; then
-                       if checkstatus normalizetrack-$LASTTRACK; then :; else do_batch_normalize; fi
-                       if checkerrors batch-normalize; then exit 1; fi
-               fi
-               if [ "$DOENCODE" = "y" ] && [ "$NOGAP" = "y" ]; then
-                       if [ "$DONORMALIZE" = "y" ]; then
-                               for UTRACKNUM in $TRACKQUEUE
-                               do
-                                       if checkstatus readtrack-$UTRACKNUM; then
-                                               if checkstatus normalizetrack-$UTRACKNUM; then :; else do_normalize $UTRACKNUM; fi
-                                       fi
-                               done
+       if [ "$GOAHEAD" != "NO" ]; then
+               for LASTTRACK in $TRACKQUEUE; do :; done
+               if checkstatus readtrack-$LASTTRACK; then
+                       if [ "$DONORMALIZE" = "y" ] && [ "$BATCHNORM" = "y" ]; then
+                               if checkstatus normalizetrack-$LASTTRACK; then :; else do_batch_normalize; fi
+                               if checkerrors batch-normalize; then exit 1; fi
+                       fi
+                       if [ "$DOENCODE" = "y" ] && [ "$NOGAP" = "y" ]; then
+                               if [ "$DONORMALIZE" = "y" ]; then
+                                       for UTRACKNUM in $TRACKQUEUE
+                                       do
+                                               if checkstatus readtrack-$UTRACKNUM; then
+                                                       if checkstatus normalizetrack-$UTRACKNUM; then :; else do_normalize $UTRACKNUM; fi
+                                               fi
+                                       done
+                               fi
+                               if checkstatus encodetrack-$LASTTRACK; then :; else do_nogap_encode; fi
+                               if checkerrors nogap-encode; then exit 1; fi
                        fi
-                       if checkstatus encodetrack-$LASTTRACK; then :; else do_nogap_encode; fi
-                       if checkerrors nogap-encode; then exit 1; fi
                fi
        fi
 fi
index c9db95e..26fac1e 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,5 +1,8 @@
 abcde 2.7.1
 
+  * Fix incorrect use of 'break'. Thanks to Reuben Thomas for the
+    bug report and fix which closes Issue 6:
+    http://abcde.einval.com/bugzilla/show_bug.cgi?id=6
   * Make id3 happy when 'Genre' field is empty. Thanks to Martin
     Husemann for the fix which closes Issue 8:
     http://abcde.einval.com/bugzilla/show_bug.cgi?id=8