From da1a5435702d1d270d0d14c86e6579fc7fd6c752 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Fri, 2 Feb 2024 19:31:17 +1100 Subject: [PATCH] Bug fix; the "month of the key" is 6 characters from index 0 --- dupltool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dupltool b/dupltool index eda2dd8..b7fb409 100755 --- 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 -- 2.39.2