Bugfix for moved history.toml
This commit is contained in:
parent
9c15ea791f
commit
0f1de67db6
3 changed files with 8 additions and 5 deletions
|
@ -17,10 +17,10 @@ impl SeriesHistory {
|
|||
let config_dir = path.parent().expect("Something went wrong with confy");
|
||||
|
||||
|
||||
|
||||
match Path::new(format!("{}/history.toml", config_dir.to_str().expect("Conversion to str should not fail for a dir")).as_str()).exists() {
|
||||
let path = format!("{}/history.toml", config_dir.to_str().expect("Conversion to str should not fail for a dir"));
|
||||
match Path::new(path.as_str()).exists() {
|
||||
true => {
|
||||
let file_contents: String = match fs::read_to_string("history.toml") {
|
||||
let file_contents: String = match fs::read_to_string(path.as_str()) {
|
||||
Ok(data) => data,
|
||||
Err(e) => {
|
||||
let err_msg = format!("{e}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue