Third attempt to make a workaround for the Linux specific bug in the fs crate, to make it support backslashess in top_dir path

This commit is contained in:
Anynomouss
2025-04-06 21:59:36 +02:00
parent 004c46958b
commit cd2f64c234
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -189,7 +189,11 @@ pub fn initial_setup_wallet(
) -> Result<GlobalWalletConfig, ConfigError> {
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)?;
}
}