From ffb90bb9e2cb2e49847931814e7860532ba536d1 Mon Sep 17 00:00:00 2001 From: Michael Bryan Date: Fri, 26 Jan 2018 14:38:53 +0800 Subject: [PATCH] Made sure we create the themes directory (#586) --- src/renderer/html_handlebars/hbs_renderer.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index 5be77336..8dcc6b01 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -245,6 +245,10 @@ impl HtmlHandlebars { for custom_file in custom_files { let output_location = destination.join(custom_file); + if let Some(parent) = output_location.parent() { + fs::create_dir_all(parent) + .chain_err(|| format!("Unable to create {}", parent.display()))?; + } debug!( "Copying {} -> {}", custom_file.display(),