Filter out more broad paths

This commit is contained in:
mtkennerly 2024-04-21 20:16:03 -04:00
parent 22bae27388
commit c19bea11e5
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
4 changed files with 32 additions and 67 deletions

View file

@ -69824,11 +69824,6 @@ Bigscreen Beta:
- config
when:
- os: windows
"<winDocuments>/*.b2g":
tags:
- save
when:
- os: windows
gog:
id: 1959845271
"Biing!: Sex, Intrigue and Scalpels":
@ -76696,15 +76691,6 @@ BloXoR:
steam:
id: 1079910
Blob From Space:
files:
"<winAppData>/**/*.blobfromspace":
when:
- os: windows
store: steam
"<winAppData>/**/*.jos":
when:
- os: windows
store: steam
id:
steamExtra:
- 348370
@ -145202,15 +145188,6 @@ Dandara:
steam:
id: 612390
Dandelion - Wishes brought to you -:
files:
"<home>/Library/RenPy":
when:
- os: mac
store: steam
"<winAppData>/RenPy":
when:
- os: windows
store: steam
id:
steamExtra:
- 404450
@ -196834,10 +196811,6 @@ ElectricVLab:
when:
- os: windows
store: steam
"<winDocuments>/**/*.lab":
when:
- os: windows
store: steam
installDir:
ElectricVLab: {}
launch:
@ -297479,14 +297452,6 @@ Hunger:
"<base>/SavesDir/*.sav":
when:
- store: steam
"<winLocalAppData>/*/**/SaveItem.sav":
when:
- os: windows
store: steam
"<winLocalAppData>/*/**/levelcomplete.ini":
when:
- os: windows
store: steam
"<winLocalAppData>/SavesDir/**/Settings.ini":
when:
- store: steam
@ -308316,16 +308281,14 @@ IndustrialVR - Hoover Dam:
id: 768770
Industries of Titan:
files:
"<winLocalAppData>/*.met":
tags:
- save
"<winLocalAppData>/Titan/**/*.met":
when:
- os: windows
"<winLocalAppData>/*.sav":
tags:
- save
store: steam
"<winLocalAppData>/Titan/**/*.sav":
when:
- os: windows
store: steam
id:
lutris: industries-of-titan
installDir:
@ -521497,11 +521460,6 @@ SimPark:
- config
when:
- os: windows
"<winDocuments>/*.prk":
tags:
- save
when:
- os: windows
SimRail - The Railway Simulator:
files:
"<home>/AppData/LocalLow/SimKol/SimRail/buttons.conf":
@ -521536,13 +521494,6 @@ SimSafari:
- config
when:
- os: windows
SimTown:
files:
"<winDocuments>/*.twn":
tags:
- save
when:
- os: windows
SimTunes:
files:
"<base>/Tunes":
@ -609263,12 +609214,6 @@ The Pinball Wizard:
steam:
id: 2101800
The Pink Panther in Hokus Pokus Pink:
files:
"<winDocuments>/*.pk2":
tags:
- save
when:
- os: windows
registry:
HKEY_CURRENT_USER/Software/Wanderlust/The Pink Panther in Hokus Pokus Pink:
tags:
@ -646972,13 +646917,6 @@ Ultimate War:
store: steam
steam:
id: 514490
Ultimate Yahtzee:
files:
"<winDocuments>/*.yat":
tags:
- save
when:
- os: windows
Ultimate Zombie Defense:
installDir:
Ultimate Zombie Defense: {}

View file

@ -3102,6 +3102,7 @@
* [Blitzkrieg 2](https://www.pcgamingwiki.com/wiki/?curid=13949)
* [Blitzkrieg 3](https://www.pcgamingwiki.com/wiki/?curid=34192)
* [Blixten Quest](https://www.pcgamingwiki.com/wiki/?curid=122494)
* [Blob From Space](https://www.pcgamingwiki.com/wiki/?curid=49508)
* [Blobby Tennis](https://www.pcgamingwiki.com/wiki/?curid=62032)
* [Block](https://www.pcgamingwiki.com/wiki/?curid=140804)
* [Block bat invasion](https://www.pcgamingwiki.com/wiki/?curid=134429)
@ -5960,6 +5961,7 @@
* [Dancing Queen](https://www.pcgamingwiki.com/wiki/?curid=148597)
* [Dancing with Anime Girls VR](https://www.pcgamingwiki.com/wiki/?curid=156766)
* [DanCop - Daniela on Duty](https://www.pcgamingwiki.com/wiki/?curid=135217)
* [Dandelion - Wishes brought to you -](https://www.pcgamingwiki.com/wiki/?curid=37691)
* [Dandy & Randy](https://www.pcgamingwiki.com/wiki/?curid=121409)
* [Dandy Dungeon - Legend of Brave Yamada -](https://www.pcgamingwiki.com/wiki/?curid=152871)
* [Dandy: Or a Brief Glimpse Into the Life of the Candy Alchemist](https://www.pcgamingwiki.com/wiki/?curid=46993)
@ -23981,6 +23983,7 @@
* [Simraceway](https://www.pcgamingwiki.com/wiki/?curid=186058)
* [Simson Tuningwerkstatt 3D](https://www.pcgamingwiki.com/wiki/?curid=122346)
* [SimTower](https://www.pcgamingwiki.com/wiki/?curid=51200)
* [SimTown](https://www.pcgamingwiki.com/wiki/?curid=19817)
* [Simulator Gas Station](https://www.pcgamingwiki.com/wiki/?curid=65831)
* [Simulator Hipstera 2k17](https://www.pcgamingwiki.com/wiki/?curid=69643)
* [Sin Castle](https://www.pcgamingwiki.com/wiki/?curid=58360)
@ -30765,6 +30768,7 @@
* [Ultimate Tic-Tac-Toe](https://www.pcgamingwiki.com/wiki/?curid=48068)
* [Ultimate War](https://www.pcgamingwiki.com/wiki/?curid=98914)
* [Ultimate Word Search 2: Letter Boxed](https://www.pcgamingwiki.com/wiki/?curid=36151)
* [Ultimate Yahtzee](https://www.pcgamingwiki.com/wiki/?curid=7462)
* [Ultimate Zombie Defense](https://www.pcgamingwiki.com/wiki/?curid=156436)
* [Ultimo Reino](https://www.pcgamingwiki.com/wiki/?curid=122460)
* [Ultimus bellum](https://www.pcgamingwiki.com/wiki/?curid=74530)

View file

@ -26,6 +26,20 @@ pub mod placeholder {
XDG_CONFIG,
];
/// These are paths where `<placeholder>/*/` is suspicious.
pub const AVOID_WILDCARDS: &[&str] = &[
ROOT,
HOME,
WIN_APP_DATA,
WIN_LOCAL_APP_DATA,
WIN_DOCUMENTS,
WIN_PUBLIC,
WIN_PROGRAM_DATA,
WIN_DIR,
XDG_DATA,
XDG_CONFIG,
];
pub const ROOT: &str = "<root>";
pub const GAME: &str = "<game>";
pub const BASE: &str = "<base>";

View file

@ -51,7 +51,7 @@ pub fn normalize(path: &str) -> String {
}
pub fn too_broad(path: &str) -> bool {
use placeholder::{BASE, HOME, ROOT, STORE_USER_ID, WIN_DIR, WIN_DOCUMENTS, XDG_CONFIG, XDG_DATA};
use placeholder::{BASE, HOME, ROOT, STORE_USER_ID, WIN_APP_DATA, WIN_DIR, WIN_DOCUMENTS, XDG_CONFIG, XDG_DATA};
for item in placeholder::ALL {
if path == *item {
@ -59,6 +59,12 @@ pub fn too_broad(path: &str) -> bool {
}
}
for item in placeholder::AVOID_WILDCARDS {
if path.starts_with(&format!("{item}/*")) {
return true;
}
}
// These paths are present whether or not the game is installed.
// If possible, they should be narrowed down on the wiki.
for item in [
@ -73,8 +79,11 @@ pub fn too_broad(path: &str) -> bool {
format!("{HOME}/Documents/My Games"),
format!("{HOME}/Library/Application Support"),
format!("{HOME}/Library/Preferences"),
format!("{HOME}/.renpy"),
format!("{HOME}/Library/RenPy"),
format!("{HOME}/Telltale Games"),
format!("{ROOT}/config"),
format!("{WIN_APP_DATA}/RenPy"),
format!("{WIN_DIR}/win.ini"),
format!("{WIN_DIR}/SysWOW64"),
format!("{WIN_DOCUMENTS}/My Games"),