From 6ac967c6d999e25b7975c4f8f1f850f892c3e617 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Mon, 26 Apr 2021 21:58:11 +0100 Subject: [PATCH] try to fix paths for windows --- src/main.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index b1b55ff..33f0b17 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,7 +23,8 @@ fn save_config(config: Config) { let mut config_path = dirs::config_dir() .expect("Couldn't find user config directory"); - config_path.push("ruin/lull"); + config_path.push("ruin"); + config_path.push("lull"); if !config_path.exists() { std::fs::create_dir_all(&config_path) @@ -46,7 +47,9 @@ fn load_config() -> Option { let mut config_path = dirs::config_dir() .expect("Couldn't find user config directory"); - config_path.push("ruin/lull/lull.toml"); + config_path.push("ruin"); + config_path.push("lull"); + config_path.push("lull.toml"); let file = File::open(config_path); @@ -93,7 +96,8 @@ fn error_popup(message: &str) { fn get_data_dir() -> PathBuf { let mut data_dir = dirs::data_dir().expect("Couldn't find user data directory"); - data_dir.push("ruin/lull"); + data_dir.push("ruin"); + data_dir.push("lull"); if !data_dir.exists() { std::fs::create_dir_all(&data_dir).expect("Couldn't create lull data directory");