From: Paul Hänsch Date: Wed, 25 May 2022 21:19:38 +0000 (+0200) Subject: avoid leadig double slashes in page_children X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=048a34f1ece94afbbff0c7c0b125b5dbc08a0d43;p=shellwiki avoid leadig double slashes in page_children --- diff --git a/tools.sh b/tools.sh index 1b7e677..c5545fb 100755 --- a/tools.sh +++ b/tools.sh @@ -77,8 +77,8 @@ page_children(){ case $page in /*) - for glob in "$_DATA/pages/${page}"*/; do printf '%s\n' "${glob#"$_DATA/pages"}"; done - for glob in "$_EXEC/pages/${page}"*/; do printf '%s\n' "${glob#"$_EXEC/pages"}"; done + for glob in "$_DATA/pages/${page}"*/; do printf '%s\n' "${glob#"$_DATA/pages/"}"; done + for glob in "$_EXEC/pages/${page}"*/; do printf '%s\n' "${glob#"$_EXEC/pages/"}"; done ;; *) for glob in "$_DATA/pages/$PATH_INFO/${page}"*/; do printf '%s\n' "${glob#"$_DATA/pages/$PATH_INFO/"}"; done