swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit 530f3638b73b9e73aafa20cc168bafd7d5e331ab
parent 4e28e9d23619a0614e89a7463e4ec5452c2d5278
Author: uriel@engel.se.cat-v.org <unknown>
Date:   Sun, 28 Dec 2008 23:43:15 +0100

Fix blagh_init to fail when we should fail.
Diffstat:
Mapps/blagh/app.rc | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc @@ -1,13 +1,14 @@ fn blagh_init { - if(~ $#blaghDirs 0 && ~ $req_path */[bB]log/index) + if(~ $#blaghDirs 0 && ~ $local_path */[bB]log/index*) blaghDirs=( . ) # Should not match sub-dirs! if(! ~ $#blaghDirs 0) { # && test -d / `{echo '-a -d '^$req_path^$blaghDirs} - blagh_uri=`{echo $req_path|sed 's/index\.(atom|rss)$//'} + blagh_uri=`{echo $req_path|sed 's/index(\.(atom|rss))?$//'} blagh_url=$base_uri^$blagh_root_path blagh_root=$sitedir^$blagh_uri + dprint $blagh_root if(~ $req_path */[0-9][0-9][0-9][0-9]/ */[0-9][0-9][0-9][0-9]/[0-9][0-9]/ */[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/) status='Use default handler' @@ -30,8 +31,8 @@ fn blagh_init { dprint XXXX $req_path } + status=() } - status=() } fn blagh_body {