Bug fix; the "month of the key" is 6 characters from index 0 master 0.1
authorRalph Ronnquist <rrq@rrq.au>
Fri, 2 Feb 2024 08:31:17 +0000 (19:31 +1100)
committerRalph Ronnquist <rrq@rrq.au>
Fri, 2 Feb 2024 08:31:17 +0000 (19:31 +1100)
dupltool

index eda2dd854f37981f2071da997eee09de564c7355..b7fb409573f0968a5658f9a13b8b9f56108a9482 100755 (executable)
--- a/dupltool
+++ b/dupltool
@@ -51,7 +51,7 @@ SFTP="sftp://$SFTP" # openssh-client=1:8.4p1-5+deb11u1
 FILES=( $(remote_from_to_month_prefix) )
 
 if [ -n "$FILES" ] ; then
-    THATMONTH="${FILES[0]:6:6}" # to-month of newest
+    THATMONTH="${FILES[0]:0:6}" # to-month of newest
     if [ "$THISMONTH" != "$THATMONTH" ] ; then
        echo "** New monthly snapshot; stashing daily into .$THATMONTH" >&2
        { # Generate command stream for sftp