feat: full_quests_path
- Added Config::full_quests_path - Fixed quests saving in parent folder
This commit is contained in:
parent
119b7bce9c
commit
2e14614bdf
2 changed files with 21 additions and 3 deletions
|
|
@ -154,7 +154,8 @@ impl Quest {
|
|||
/// ```
|
||||
pub fn save(&self, path: PathBuf) -> Result<(), QuestError> {
|
||||
let filename = format!("{}.toml", self.id);
|
||||
let full_path = path.with_file_name(filename);
|
||||
let mut full_path = path;
|
||||
full_path.push(filename);
|
||||
|
||||
let str = match toml::to_string_pretty(&self) {
|
||||
Ok(string) => string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue