From 154fd687b4b16eedbe1bf774b9ecdeab84c9694b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 23 May 2011 21:56:12 -0400 Subject: v3: html, close files; syslink index.html to toc.html * syslink will need revisit (will only "work" properly with by_language dir structure) --- lib/sisu/v3/html.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib') diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index b569653f..d586c25d 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -628,6 +628,7 @@ WOK end end rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + ensure; @filename_html_scroll.close end end def segtoc @@ -645,6 +646,18 @@ WOK end end rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + ensure + @filename_html_segtoc.close + @filename_html_index.close + ## only works properly for directory_structure_by language, fix + unless FileTest.file?("#{@file.output_path.html.dir}/index.html") + pwd_set=Dir.pwd + Dir.chdir(@file.output_path.html.dir) + system(" + ln -s #{@file.base_filename.html_segtoc} index.html + ") + Dir.chdir(pwd_set) + end end end end -- cgit v1.2.3