aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-07-02 14:06:31 -0400
committerRalph Amissah <ralph@amissah.com>2010-07-02 14:06:31 -0400
commit1b62b854a9e3e977f5f801d63d91139b782a6890 (patch)
treecf45d9acaa3019c433208739ababc8e2c983c0ae /lib/sisu/v2/sysenv.rb
parentRemoving useless whitespaces from upstream files at EOL. (diff)
sysenv, make output directory if needed (if possible)
Diffstat (limited to 'lib/sisu/v2/sysenv.rb')
-rw-r--r--lib/sisu/v2/sysenv.rb6
1 files changed, 5 insertions, 1 deletions
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}/.")