Package: abcde Version: 2.9.1-1 Severity: normal Control: tag -1 patch abcde -p; ends up wrongly naming track 8 and 9 because 08 and 09 are not valid octal. The attached patch clears up at least the first instance of this. [It's even more annoying when you're not renaming the tracks, and you rip subsequent disks with -W, because track 8 and 9 get overwritten. Oh well.]
-- Don Armstrong https://www.donarmstrong.com I cannot find rest Because I am powerless To amend a broken world. -- Guy Gavriel Kay _Under Heaven_ p295
From 5a2bdc82ecb3988b774798a34bffaa9dfd98a109 Mon Sep 17 00:00:00 2001 From: Don Armstrong <[email protected]> Date: Fri, 23 Mar 2018 08:34:39 -0700 Subject: [PATCH] remove leading zeros when calculating track number - Stop printf interpreting numbers with leading zeros as octal --- abcde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abcde b/abcde index 1d2d0b6..d07d087 100755 --- a/abcde +++ b/abcde @@ -463,7 +463,7 @@ gettracknum() if [ -n "$STARTTRACKNUMBER" ] ; then # Get the trackpadding from the current track, also trim whitespace for MacOSX CURRENTTRACKPADDING=$(echo -n "$UTRACKNUM" | wc -c | tr -d ' ') - TRACKNUM=$( printf %0."${CURRENTTRACKPADDING}"d $(("${UTRACKNUM}" + "${STARTTRACKNUMBER}" - "${FIRSTTRACK}"))) + TRACKNUM=$( printf %0."${CURRENTTRACKPADDING}"d $(("${UTRACKNUM##0}" + "${STARTTRACKNUMBER##0}" - "${FIRSTTRACK##0}"))) else TRACKNUM="${UTRACKNUM}" fi -- 2.16.2

