diff --git a/src/freedombone-mesh-blog b/src/freedombone-mesh-blog index 5f32bb80..7073f733 100755 --- a/src/freedombone-mesh-blog +++ b/src/freedombone-mesh-blog @@ -91,7 +91,8 @@ function edit_blog { return fi CURRENT_INDEX=$(cat $CURRENT_BLOG_INDEX) - LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.rst + PREVIOUS_INDEX=$((CURRENT_INDEX - 1)) + LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${PREVIOUS_INDEX}_post.rst if [ ! -f $LAST_BLOG_ENTRY ]; then return fi