feat: full_quests_path

- Added Config::full_quests_path
- Fixed quests saving in parent folder
This commit is contained in:
Alexey 2025-11-29 14:12:07 +03:00
commit 2e14614bdf
2 changed files with 21 additions and 3 deletions

View file

@ -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,