From 602819f2fa04b2e31ba9c8df79ccd6a21db3cff5 Mon Sep 17 00:00:00 2001 From: Uriel Date: Thu, 5 Feb 2009 03:16:14 +0000 Subject: [PATCH] Make conf_hide_path more flexible, and note a limitation in sitemap dirfilter handling. --- bin/wercconf.rc | 2 +- lib/sitemap.tpl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/wercconf.rc b/bin/wercconf.rc index e98cbff..2855b9c 100644 --- a/bin/wercconf.rc +++ b/bin/wercconf.rc @@ -8,5 +8,5 @@ fn conf_perm_redirect { fn conf_hide_paths { for(i in $*) - dirfilter=$dirfilter^'/^'$i'$/d; ' + dirfilter=$dirfilter^'/'^`{echo $i|sed 's!/!\\/!g'}^'/d; ' } diff --git a/lib/sitemap.tpl b/lib/sitemap.tpl index e873ba2..3ade1e9 100644 --- a/lib/sitemap.tpl +++ b/lib/sitemap.tpl @@ -9,6 +9,7 @@ fn getMdDesc { sed 's/^(.......................................................................................................[^ ]*).*$/\1/g; 1q' < $1 } +# XXX Instead of recursion should use du(1) or similar. fn listDir { d=$1 if(~ $#d 0)