aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output_epub.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/output_epub.d')
-rw-r--r--src/sdp/output_epub.d12
1 files changed, 9 insertions, 3 deletions
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");