aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output_html.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/output_html.d')
-rw-r--r--src/sdp/output_html.d12
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) {