From 3a9802d3012f42caf0bf954b737c7c3e51782b86 Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Thu, 28 Apr 2016 02:59:54 -0400 Subject: [PATCH] The output directory is now correctly set on sections. The output directory is now correctly set so that a section's resource's compiled output will be placed in the correct spot. --- src/processor.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/processor.rs b/src/processor.rs index 9db65f8..ff1615e 100644 --- a/src/processor.rs +++ b/src/processor.rs @@ -321,6 +321,7 @@ impl Processor let mut dst_dir: PathBuf; // Adjust the src path to be from the resources directory. + // Adjust the destination path to be rooted at the output directory. for section in self.sections.iter_mut() { dir = self.resources_dir.clone(); @@ -339,6 +340,23 @@ impl Processor "source filename into a string."); } } + + dir = self.output_dir.clone(); + dir.push(section.dst_path.clone()); + match dir.to_str() + { + Some(dst_filename) => + { + section.dst_path.clear(); + section.dst_path.push_str(dst_filename); + } + + None => + { + warn!("{} {}", "There was an issue converting the resource's", + "destination filename into a string."); + } + } } // Handle making sure that each directory is present