shithub: werc

Download patch

ref: 39b210f26eb8dc2d8a20cca74d33aa5a8eb16198
parent: fc9b6f8f2174a43018e0cc01c2c06e84c72ab3a6
parent: fbb3031887c9a92a68ee02711e89811af638f6be
author: uriel <[email protected]>
date: Wed Sep 23 08:31:52 EDT 2009

Merge bugfix for dirdir from werc-dev repo.

--- a/apps/dirdir/app.rc
+++ b/apps/dirdir/app.rc
@@ -6,7 +6,12 @@
 
 fn dirdir_init {
     if(! ~ $#enable_wiki 0 && check_user $wiki_editors_groups) {
-        dirdir_file=$local_path.md
+        lp=$local_path
+        # werc.rc doesn't append /index when $local_path doesn't exit
+        # maybe it should, but for now we can fix it up here.
+        if(~ $lp */) 
+            lp=$lp^'index'
+        dirdir_file=$lp.md
         dirdir_dir=$dirdir_file^'_werc/dirdir/'
  
         if(~ 1 $#post_arg_dirdir_edit $#post_arg_dirdir_preview)