mirror of
https://github.com/lise-henry/crowbook
synced 2024-09-21 16:33:07 +02:00
Add self.root.join() to book path for import_config
This commit is contained in:
parent
68cdc8b6d0
commit
184d6e6c7e
@ -179,7 +179,11 @@ impl BookOptions {
|
||||
if let Yaml::String(value) = value {
|
||||
if &key == "import_config" {
|
||||
// special case, not a real option
|
||||
let book = try!(Book::new_from_file(&value, InfoLevel::Info, &[]));
|
||||
let book = try!(Book::new_from_file(try!(self.root.join(&value)
|
||||
.to_str()
|
||||
.ok_or(Error::BookOption(self.source.clone(),
|
||||
format!("'{}''s path contains invalid UTF-8 code", &value)))),
|
||||
InfoLevel::Info, &[]));
|
||||
try!(self.merge(book.options));
|
||||
Ok(None)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user