1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-09-30 00:43:44 +02:00

Fix Epub renderer which still used resources.path

This commit is contained in:
Elisabeth Henry 2016-03-05 18:09:25 +01:00
parent 5676b5ad43
commit fae0aef7d4

@ -135,7 +135,7 @@ impl<'a> EpubRenderer<'a> {
// Write additional resources
if let Ok(list) = self.book.options.get_paths_list("resources.files") {
let list = try!(self.get_files(list));
let data_path = Path::new(try!(self.book.options.get_relative_path("resources.path")));
let data_path = Path::new(try!(self.book.options.get_relative_path("resources.out_path")));
for path in list{
let mut f = try!(File::open(self.book.root.join(&path)).map_err(|_| Error::FileNotFound(path.clone())));
let mut content = vec!();
@ -240,7 +240,7 @@ impl<'a> EpubRenderer<'a> {
// and additional files too
if let Ok(list) = self.book.options.get_paths_list("resources.files") {
let list = try!(self.get_files(list));
let data_path = Path::new(self.book.options.get_relative_path("resources.path").unwrap());
let data_path = Path::new(self.book.options.get_relative_path("resources.out_path").unwrap());
for path in list {
let format = self.get_format(&path);
let path = data_path.join(&path);