diff --git a/src/manifest.rs b/src/manifest.rs index 1e9c7ed4..77cd91da 100644 --- a/src/manifest.rs +++ b/src/manifest.rs @@ -251,11 +251,11 @@ impl Game { } fn add_file_constraint(&mut self, path: String, constraint: GameFileConstraint) { - self.files - .entry(path.replace('\\', "/")) - .or_default() - .when - .insert(constraint); + let path = path + .replace('\\', "/") + .replace("{64BitSteamID}", placeholder::STORE_USER_ID) + .replace("{Steam3AccountID}", placeholder::STORE_USER_ID); + self.files.entry(path).or_default().when.insert(constraint); } pub fn integrate_steam(&mut self, cache: &SteamCacheEntry) { @@ -383,11 +383,6 @@ impl Game { path = path.replace(&transform.find, &transform.replace); } - path = path - .replace('\\', "/") - .replace("{64BitSteamID}", placeholder::STORE_USER_ID) - .replace("{Steam3AccountID}", placeholder::STORE_USER_ID); - self.add_file_constraint(path, constraint.clone()); } } diff --git a/src/steam.rs b/src/steam.rs index d3dc3038..9781fd44 100644 --- a/src/steam.rs +++ b/src/steam.rs @@ -11,8 +11,8 @@ use crate::{ Error, State, REPO, }; -const SAVE_INTERVAL: u32 = 100; -const CHUNK_SIZE: usize = 10; +const SAVE_INTERVAL: u32 = 250; +const CHUNK_SIZE: usize = 25; #[derive(Debug, Default, serde::Serialize, serde::Deserialize)] pub struct SteamCache(pub BTreeMap);