shithub: werc

Download patch

ref: 408ba6b26870363f9dbc08c7c05c1311ff31af7d
parent: ce30272174a45d7ea85906ab30d42ed9336fce4f
author: sl <[email protected]>
date: Sat Feb 14 02:26:52 EST 2009

Correct dirfilter matching of /sitemap.txt and /robots.txt, note that we match them even if not in site root.

--- a/bin/werc.rc
+++ b/bin/werc.rc
@@ -10,7 +10,7 @@
 
 # Expected input: ls -F style, $sitedir/path/to/files/
 #          <ls -F+x><symlink hack><Useless?><hiden files  >
-dirfilter='s/\*$//; s,/+\./+,/,g; s,^\./,,; /\/[._][^\/]/d; /'$forbidden_uri_chars'/d; /^\/(robots|sitemap)\.txt$|\/index\.(md|html|txt|tpl)$/d; /_werc\/?$/d; '
+dirfilter='s/\*$//; s,/+\./+,/,g; s,^\./,,; /\/[._][^\/]/d; /'$forbidden_uri_chars'/d; /\/index\.(md|html|txt|tpl)$/d; /\/(robots|sitemap)\.txt$/d; /_werc\/?$/d; '
 dirclean=' s/\.(md|html|txt)$//; '
 
 # Careful, the proper p9p path might not be set until initrc.local is sourced