From: Paul Hänsch Date: Wed, 25 May 2022 21:03:41 +0000 (+0200) Subject: fallback cd when printing revisions of deleted pages X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=2894b9a5df999265846d81651bbf0b8fb7f61500;p=shellwiki fallback cd when printing revisions of deleted pages --- diff --git a/handlers/20_revision.sh b/handlers/20_revision.sh index bbbc76b..08350c7 100755 --- a/handlers/20_revision.sh +++ b/handlers/20_revision.sh @@ -22,7 +22,7 @@ case "${PATH_INFO}" in theme_error 403 else ( export PATH_INFO="${page}" - cd "${_DATA}/pages${page}" + cd "${_DATA}/pages${page}" || cd "${_DATA}/pages/" git -C "${_DATA}" show "${rev}:pages${PATH_INFO}#page.md" \ | { printf '
'; md; printf '
'; } \ | theme_page - "${page##*/}"