# HG changeset patch # User Christophe Lincoln # Date 1389043972 0 # Node ID 6b640e0c98c87297fc77ad46ba897723541e0854 # Parent 4521322899ee354092bbe5db0513dc655d2f829d check if cache dir is writable diff -r 4521322899ee -r 6b640e0c98c8 index.cgi --- a/index.cgi Mon Jan 06 21:22:04 2014 +0000 +++ b/index.cgi Mon Jan 06 21:32:52 2014 +0000 @@ -730,14 +730,20 @@ html_header user_box get_lang - # Generate a default index on first run. + # Generate a default index on first run if [ ! -f "$wiki/$index.txt" ]; then - default_index - if [ ! -f "$wiki/$index.txt" ]; then - echo "
Directory: content/ is not writable
" + if ! default_index; then + echo "
Directory : content/ is not writable"
 				html_footer && exit 0
 			fi
 		fi
+		# Check cache dir
+		if [ ! -w "$cache" ]; then
+			echo "
Directory : cache/ is not writable"
+			echo "Command   : install -m 0777 -d $tiny/cache
" + html_footer && exit 0 + fi + # Wiki document if [ ! -f "$wiki/$d.txt" ]; then echo "

$d

" gettext "The document does not exist. You can create it or read the"