aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/output_epub.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-02-04 21:02:56 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit262f00d21e5c03fb1387d409ac10c4921d9ff27c (patch)
tree49cd60d92a2771f1b81db47a031e5ad2f1b8bfa4 /src/sdp/output_epub.d
parentreorganize org file (diff)
output, sisupod & a few switchesdoc-reform_v0.0.12
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");