mirror of
https://github.com/lise-henry/crowbook
synced 2024-09-30 04:51:21 +02:00
Fix Epub renderer which still used resources.path
This commit is contained in:
parent
5676b5ad43
commit
fae0aef7d4
@ -135,7 +135,7 @@ impl<'a> EpubRenderer<'a> {
|
|||||||
// Write additional resources
|
// Write additional resources
|
||||||
if let Ok(list) = self.book.options.get_paths_list("resources.files") {
|
if let Ok(list) = self.book.options.get_paths_list("resources.files") {
|
||||||
let list = try!(self.get_files(list));
|
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{
|
for path in list{
|
||||||
let mut f = try!(File::open(self.book.root.join(&path)).map_err(|_| Error::FileNotFound(path.clone())));
|
let mut f = try!(File::open(self.book.root.join(&path)).map_err(|_| Error::FileNotFound(path.clone())));
|
||||||
let mut content = vec!();
|
let mut content = vec!();
|
||||||
@ -240,7 +240,7 @@ impl<'a> EpubRenderer<'a> {
|
|||||||
// and additional files too
|
// and additional files too
|
||||||
if let Ok(list) = self.book.options.get_paths_list("resources.files") {
|
if let Ok(list) = self.book.options.get_paths_list("resources.files") {
|
||||||
let list = try!(self.get_files(list));
|
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 {
|
for path in list {
|
||||||
let format = self.get_format(&path);
|
let format = self.get_format(&path);
|
||||||
let path = data_path.join(&path);
|
let path = data_path.join(&path);
|
||||||
|
Loading…
Reference in New Issue
Block a user