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_epub.d | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/sdp/output_epub.d') diff --git a/src/sdp/output_epub.d b/src/sdp/output_epub.d index 076265c..f914f16 100644 --- a/src/sdp/output_epub.d +++ b/src/sdp/output_epub.d @@ -342,9 +342,15 @@ template outputEPub() { auto pth_epub = EpubPaths(); auto xhtml_format = outputXHTMLs(); try { - mkdirRecurse(pth_epub.doc_meta_inf(doc_matters.source_filename)); - mkdirRecurse(pth_epub.doc_oebps_css(doc_matters.source_filename)); - mkdirRecurse(pth_epub.doc_oebps_image(doc_matters.source_filename)); + if (!exists(pth_epub.doc_meta_inf(doc_matters.source_filename))) { + mkdirRecurse(pth_epub.doc_meta_inf(doc_matters.source_filename)); + } + if (!exists(pth_epub.doc_oebps_css(doc_matters.source_filename))) { + mkdirRecurse(pth_epub.doc_oebps_css(doc_matters.source_filename)); + } + if (!exists(pth_epub.doc_oebps_image(doc_matters.source_filename))) { + mkdirRecurse(pth_epub.doc_oebps_image(doc_matters.source_filename)); + } /+ OEBPS/[segments].xhtml +/ foreach (seg_filename; doc_matters.segnames) { auto f = File(pth_epub.fn_oebps_content_xhtml(doc_matters.source_filename, seg_filename), "w"); -- cgit v1.2.3