diff --git a/config/src/config.rs b/config/src/config.rs index 167b0ca..ef6f75a 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -189,7 +189,11 @@ pub fn initial_setup_wallet( ) -> Result { if create_path { if let Some(p) = data_path.clone() { - fs::create_dir_all(p)?; + // Fix for a bug in the rust fs package to handle "\" in paths + let p_fix = p.clone(); + let p_fix = p_fix.to_str().unwrap().to_owned().replace("\\", "/"); + let p_fix = PathBuf::from(p_fix); + fs::create_dir_all(p_fix)?; } } diff --git a/src/bin/grin-wallet.rs b/src/bin/grin-wallet.rs index 75b9d27..36d0385 100644 --- a/src/bin/grin-wallet.rs +++ b/src/bin/grin-wallet.rs @@ -86,7 +86,7 @@ fn real_main() -> i32 { let res = args.value_of("top_level_dir"); match res { Some(d) => { - let d = d.to_owned().replace("/", "\\"); + let d = d.to_owned().replace("/", "\\"); // Fix for fs to work with paths on Linux current_dir = Some(PathBuf::from(d)); } None => {