diff options
author | Ralph Amissah <ralph@amissah.com> | 2017-02-04 21:02:56 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:14 -0400 |
commit | 262f00d21e5c03fb1387d409ac10c4921d9ff27c (patch) | |
tree | 49cd60d92a2771f1b81db47a031e5ad2f1b8bfa4 /src/sdp/output_html.d | |
parent | reorganize org file (diff) |
output, sisupod & a few switchesdoc-reform_v0.0.12
Diffstat (limited to 'src/sdp/output_html.d')
-rw-r--r-- | src/sdp/output_html.d | 12 |
1 files changed, 9 insertions, 3 deletions
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) { |