Ignore case for filtering and map another Steam Cloud root

This commit is contained in:
mtkennerly 2024-04-22 13:57:13 -04:00
parent 58270b6136
commit 4461deecfe
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
4 changed files with 13 additions and 13 deletions

View file

@ -627219,10 +627219,6 @@ The Legend of Crystal Valley:
"<base>/userData":
when:
- store: steam
"<home>/Library/Application Support/userData":
when:
- os: mac
store: steam
installDir:
The Legend of Crystal Valley: {}
launch:
@ -631226,6 +631222,10 @@ The Missing Few:
steam:
id: 842910
The Mobius Machine:
files:
"<home>/Documents/The Mobius Machine/Saves":
when:
- store: steam
installDir:
The Mobius Machine: {}
launch:
@ -641284,10 +641284,6 @@ The Technician:
when:
- os: windows
store: steam
"<home>/Library/Application Support/UserData/<storeUserId>/**/*.json":
when:
- os: mac
store: steam
installDir:
The Technician: {}
steam:

View file

@ -26011,7 +26011,6 @@
* [The Misfits](https://www.pcgamingwiki.com/wiki/?curid=104797)
* [The Miskatonic](https://www.pcgamingwiki.com/wiki/?curid=100230)
* [The Missing Few](https://www.pcgamingwiki.com/wiki/?curid=157259)
* [The Mobius Machine](https://www.pcgamingwiki.com/wiki/?curid=189831)
* [The Momo Game](https://www.pcgamingwiki.com/wiki/?curid=121537)
* [The Monster](https://www.pcgamingwiki.com/wiki/?curid=121300)
* [The Monster Breeder](https://www.pcgamingwiki.com/wiki/?curid=154367)

View file

@ -55,6 +55,8 @@ pub fn normalize(path: &str) -> String {
fn too_broad(path: &str) -> bool {
use placeholder::{BASE, HOME, ROOT, STORE_USER_ID, WIN_APP_DATA, WIN_DIR, WIN_DOCUMENTS, XDG_CONFIG, XDG_DATA};
let path_lower = path.to_lowercase();
for item in placeholder::ALL {
if path == *item {
return true;
@ -80,6 +82,7 @@ fn too_broad(path: &str) -> bool {
format!("{HOME}/AppData/Roaming"),
format!("{HOME}/Documents/My Games"),
format!("{HOME}/Library/Application Support"),
format!("{HOME}/Library/Application Support/UserData"),
format!("{HOME}/Library/Preferences"),
format!("{HOME}/.renpy"),
format!("{HOME}/Library/RenPy"),
@ -95,10 +98,11 @@ fn too_broad(path: &str) -> bool {
"C:/Program Files".to_string(),
"C:/Program Files (x86)".to_string(),
] {
if path == item
|| path.starts_with(&format!("{item}/*"))
|| path.starts_with(&format!("{item}/{STORE_USER_ID}"))
|| path.starts_with(&format!("{item}/SavesDir"))
let item = item.to_lowercase();
if path_lower == item
|| path_lower.starts_with(&format!("{item}/*"))
|| path_lower.starts_with(&format!("{item}/{}", STORE_USER_ID.to_lowercase()))
|| path_lower.starts_with(&format!("{item}/savesdir"))
{
return true;
}

View file

@ -517,6 +517,7 @@ pub fn parse_root(value: &str) -> Option<&'static str> {
"winappdataroaming" => Some(placeholder::WIN_APP_DATA),
"winappdatalocal" => Some(placeholder::WIN_LOCAL_APP_DATA),
"winappdatalocallow" => Some("<home>/AppData/LocalLow"),
"windowshome" => Some(placeholder::HOME),
"winmydocuments" => Some(placeholder::WIN_DOCUMENTS),
"winsavedgames" => Some("<home>/Saved Games"),
_ => {