shithub: werc

Download patch

ref: ee748abf0f4f4845eda50886d6164e14a3c1fef1
parent: ba165ee830b67379726d9ade0916b061b683b9f7
author: sl <uriel@engel.se.cat-v.org>
date: Wed Feb 4 22:16:14 EST 2009

Make conf_hide_path more flexible, and note a limitation in sitemap dirfilter handling.

--- a/bin/wercconf.rc
+++ b/bin/wercconf.rc
@@ -8,5 +8,5 @@
 
 fn conf_hide_paths {
     for(i in $*)
-       dirfilter=$dirfilter^'/^'$i'$/d; '
+       dirfilter=$dirfilter^'/'^`{echo $i|sed 's!/!\\/!g'}^'/d; '
 }
--- a/lib/sitemap.tpl
+++ b/lib/sitemap.tpl
@@ -9,6 +9,7 @@
     sed 's/^(.......................................................................................................[^ ]*).*$/\1/g; 1q' < $1 
 }
 
+# XXX Instead of recursion should use du(1) or similar.
 fn listDir {
     d=$1
     if(~ $#d 0)