From 262f00d21e5c03fb1387d409ac10c4921d9ff27c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 4 Feb 2017 21:02:56 -0500 Subject: output, sisupod & a few switches --- src/sdp/output_html.d | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/sdp/output_html.d') diff --git a/src/sdp/output_html.d b/src/sdp/output_html.d index 7b99f4e..1d55033 100644 --- a/src/sdp/output_html.d +++ b/src/sdp/output_html.d @@ -34,7 +34,9 @@ template outputHTML() { mixin SiSUpaths; auto pth_html = HtmlPaths(); try { - mkdirRecurse(pth_html.base); + if (!exists(pth_html.base)) { + mkdirRecurse(pth_html.base); + } auto f = File(pth_html.fn_scroll(fn_src), "w"); foreach (o; doc) { f.writeln(o); @@ -185,7 +187,9 @@ template outputHTML() { auto xhtml_format = outputXHTMLs(); auto m = matchFirst(doc_matters.source_filename, rgx.src_fn); try { - mkdirRecurse(pth_html.seg(doc_matters.source_filename)); + if (!exists(pth_html.seg(doc_matters.source_filename))) { + mkdirRecurse(pth_html.seg(doc_matters.source_filename)); + } foreach (seg_filename; doc_matters.segnames) { auto f = File(pth_html.fn_seg(doc_matters.source_filename, seg_filename), "w"); foreach (docseg; doc_html[seg_filename]) { @@ -1644,7 +1648,9 @@ template outputHTML() { auto pth_css= "_sisu/css"; auto pth_css_fn= pth_css ~ "/html.css"; try { - mkdirRecurse(pth_css); + if (!exists(pth_css)) { + mkdirRecurse(pth_css); + } auto f = File(pth_css_fn, "w"); f.writeln(html_css); // foreach (o; doc) { -- cgit v1.2.3