From 1b62b854a9e3e977f5f801d63d91139b782a6890 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 2 Jul 2010 14:06:31 -0400 Subject: sysenv, make output directory if needed (if possible) --- lib/sisu/v2/sysenv.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb index 1727e630..7d4999f2 100644 --- a/lib/sisu/v2/sysenv.rb +++ b/lib/sisu/v2/sysenv.rb @@ -1352,7 +1352,11 @@ WOK man_path=@@man_path=File.expand_path(@rc['webserv']['path']) else nil end - else manpath=@@man_path + else @@man_path + end + man_path_head=man_path.gsub(/(\S+)\/[^\/\s]+$/,'\1') + unless FileTest.directory?(man_path) + mkdir_p(man_path) if File.writable?("#{man_path_head}/.") end @webserv_path=if defined? man_path \ and File.writable?("#{man_path}/.") -- cgit v1.2.3