From 4abb36c8f94665a3133d58f455bcdf13dbe5c0a7 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 7 Feb 2021 11:09:57 +0100 Subject: Bugfix: procmail.sh generated bad directory names for blog entries --- plugins/weblog/procmail/procmail.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/weblog/procmail') diff --git a/plugins/weblog/procmail/procmail.sh b/plugins/weblog/procmail/procmail.sh index 473ff8e..134d957 100755 --- a/plugins/weblog/procmail/procmail.sh +++ b/plugins/weblog/procmail/procmail.sh @@ -20,7 +20,7 @@ function mimedecode() { function next_index() { DIR=$1 - LASTENTRY=`ls -1r $DIR/$(date +%Y)/$(date +%Y%m%d)* 2>/dev/null | xargs -n 1 basename | head -n1` + LASTENTRY=`ls -1dr $DIR/$(date +%Y)/$(date +%Y%m%d)* 2>/dev/null | xargs -n 1 basename | head -n1` if [ "$LASTENTRY" == "" ] ; then echo 001 @@ -29,7 +29,7 @@ function next_index() { INDEX=${LASTENTRY:9:3} - INDEX=$(($INDEX + 2)) + INDEX=$(($INDEX + 1)) while [ "$((${#INDEX} < 3))" == "1" ] ; do INDEX=0$INDEX ; done -- cgit v1.2.3