diff options
author | Roland Reichwein <mail@reichwein.it> | 2021-02-07 11:09:57 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2021-02-07 11:09:57 +0100 |
commit | 4abb36c8f94665a3133d58f455bcdf13dbe5c0a7 (patch) | |
tree | f0d28530100dcae0cfb0614ce39a0cd508e9a617 /plugins | |
parent | 21f54c28f899f5510c8d92fe7393b45f91e2b839 (diff) |
Bugfix: procmail.sh generated bad directory names for blog entries
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/weblog/procmail/procmail.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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 |