Normalize Steam Cloud paths more consistently
This commit is contained in:
parent
c087e48a1b
commit
e10c8ac1e5
2 changed files with 7 additions and 12 deletions
|
@ -251,11 +251,11 @@ impl Game {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn add_file_constraint(&mut self, path: String, constraint: GameFileConstraint) {
|
fn add_file_constraint(&mut self, path: String, constraint: GameFileConstraint) {
|
||||||
self.files
|
let path = path
|
||||||
.entry(path.replace('\\', "/"))
|
.replace('\\', "/")
|
||||||
.or_default()
|
.replace("{64BitSteamID}", placeholder::STORE_USER_ID)
|
||||||
.when
|
.replace("{Steam3AccountID}", placeholder::STORE_USER_ID);
|
||||||
.insert(constraint);
|
self.files.entry(path).or_default().when.insert(constraint);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn integrate_steam(&mut self, cache: &SteamCacheEntry) {
|
pub fn integrate_steam(&mut self, cache: &SteamCacheEntry) {
|
||||||
|
@ -383,11 +383,6 @@ impl Game {
|
||||||
path = path.replace(&transform.find, &transform.replace);
|
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());
|
self.add_file_constraint(path, constraint.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,8 @@ use crate::{
|
||||||
Error, State, REPO,
|
Error, State, REPO,
|
||||||
};
|
};
|
||||||
|
|
||||||
const SAVE_INTERVAL: u32 = 100;
|
const SAVE_INTERVAL: u32 = 250;
|
||||||
const CHUNK_SIZE: usize = 10;
|
const CHUNK_SIZE: usize = 25;
|
||||||
|
|
||||||
#[derive(Debug, Default, serde::Serialize, serde::Deserialize)]
|
#[derive(Debug, Default, serde::Serialize, serde::Deserialize)]
|
||||||
pub struct SteamCache(pub BTreeMap<u32, SteamCacheEntry>);
|
pub struct SteamCache(pub BTreeMap<u32, SteamCacheEntry>);
|
||||||
|
|
Reference in a new issue