[Abcde-users] 2.9.1 minor error

Steve McIntyre steve at einval.com
Thu Aug 2 15:53:56 BST 2018


On Tue, Jul 17, 2018 at 03:09:34PM -0700, John Straw wrote:
>
>Or an alternate fix which follows the convention used elsewhere in the
>code:
>
>diff --git a/abcde b/abcde
>index 12678d2..bb8b202 100755
>--- a/abcde
>+++ b/abcde
>@@ -463,7 +463,8 @@ 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})))
>+               REALTRACKNUM=$(expr $UTRACKNUM + 0) # Unpad
>+               TRACKNUM=$( printf %0.${CURRENTTRACKPADDING}d $((${REALTRACKNUM} + ${STARTTRACKNUMBER} - ${FIRSTTRACK})))
>        else
>                TRACKNUM=${UTRACKNUM}
>        fi

Applied, thanks!

-- 
Steve McIntyre, Cambridge, UK.                                steve at einval.com
"Arguing that you don't care about the right to privacy because you have
 nothing to hide is no different than saying you don't care about free
 speech because you have nothing to say."
   -- Edward Snowden




More information about the Abcde-users mailing list