Try to fix saving plugins with "\\" in path

This commit is contained in:
Tyler Hallada 2022-09-05 18:47:43 -04:00
parent e531386095
commit fe908799d7
3 changed files with 5 additions and 4 deletions

4
Cargo.lock generated
View File

@ -199,9 +199,9 @@ dependencies = [
[[package]]
name = "compress-tools"
version = "0.12.0"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ef528870e8a8f354a5a86805dcc472687d0a636874eb5eecc9ef9e0eeba149e"
checksum = "6d4318a3d43a20f0eacfa42b5492eb9cbab5875bb5bb5d1feb07d673a0b72777"
dependencies = [
"derive_more",
"libc",

View File

@ -11,7 +11,7 @@ description = "Saves Skyrim mod cell edits to a database"
anyhow = "1.0"
argh = "0.1"
chrono = { version = "0.4", features = ["serde"] }
compress-tools = "0.12"
compress-tools = "0.13"
dotenv = "0.15"
futures = "0.3"
humansize = "1.1"

View File

@ -95,7 +95,8 @@ pub async fn extract_with_compress_tools(
let (file_path, mut plugin_buf) = plugin?;
let plugin_span = info_span!("plugin", name = ?file_path);
let _plugin_span = plugin_span.enter();
process_plugin(&mut plugin_buf, &pool, &db_file, &db_mod, &file_path, game_name).await?;
let safe_file_path = file_path.replace("\\", "/");
process_plugin(&mut plugin_buf, &pool, &db_file, &db_mod, &safe_file_path, game_name).await?;
}
Ok(())
}