Mark some more paths as too broad
This commit is contained in:
parent
7589448030
commit
d132d15c21
4 changed files with 22 additions and 39 deletions
|
@ -19640,11 +19640,6 @@ After the End:
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
"After the End: The Harvest":
|
"After the End: The Harvest":
|
||||||
files:
|
|
||||||
"<base>/C:/Program Files (x86)/Steam/steamapps/common/After The End The Harvest/**/*.rvdata2":
|
|
||||||
when:
|
|
||||||
- os: windows
|
|
||||||
store: steam
|
|
||||||
installDir:
|
installDir:
|
||||||
After The End The Harvest: {}
|
After The End The Harvest: {}
|
||||||
launch:
|
launch:
|
||||||
|
@ -71018,10 +71013,6 @@ Biorhythm:
|
||||||
steam:
|
steam:
|
||||||
id: 1033340
|
id: 1033340
|
||||||
Bios Ex - Yami no Wakusei:
|
Bios Ex - Yami no Wakusei:
|
||||||
files:
|
|
||||||
"<base>/D:/Games ISO/GamePC/Steam/SteamApps/common/Bios Ex/game/saves/*.save":
|
|
||||||
when:
|
|
||||||
- store: steam
|
|
||||||
installDir:
|
installDir:
|
||||||
Bios Ex: {}
|
Bios Ex: {}
|
||||||
launch:
|
launch:
|
||||||
|
@ -90723,22 +90714,10 @@ Bud Spencer & Terence Hill - Slaps and Beans:
|
||||||
id: 564050
|
id: 564050
|
||||||
"Bud Spencer & Terence Hill: Slaps and Beans 2":
|
"Bud Spencer & Terence Hill: Slaps and Beans 2":
|
||||||
files:
|
files:
|
||||||
"<home>/AppData/LocalLow/TrinityTeam/SnB2/**/*:*":
|
|
||||||
when:
|
|
||||||
- os: windows
|
|
||||||
store: steam
|
|
||||||
"<home>/Library/Application Support/TrinityTeam/SnB2/**/**":
|
"<home>/Library/Application Support/TrinityTeam/SnB2/**/**":
|
||||||
when:
|
when:
|
||||||
- os: mac
|
- os: mac
|
||||||
store: steam
|
store: steam
|
||||||
"<xdgConfig>/unity3d/**/*.*":
|
|
||||||
when:
|
|
||||||
- os: linux
|
|
||||||
store: steam
|
|
||||||
"<xdgData>/unity3d/**/*.*":
|
|
||||||
when:
|
|
||||||
- os: linux
|
|
||||||
store: steam
|
|
||||||
installDir:
|
installDir:
|
||||||
Bud Spencer & Terence Hill - Slaps And Beans 2: {}
|
Bud Spencer & Terence Hill - Slaps And Beans 2: {}
|
||||||
launch:
|
launch:
|
||||||
|
@ -254799,10 +254778,6 @@ Ginga Kagekidan - 放課後くるーずっ!:
|
||||||
"<home>/AppData/LocalLow/Drakhar Studio/Ginger_ Beyond the Crystal/*.prefs":
|
"<home>/AppData/LocalLow/Drakhar Studio/Ginger_ Beyond the Crystal/*.prefs":
|
||||||
when:
|
when:
|
||||||
- store: steam
|
- store: steam
|
||||||
"<home>/Library/Application Support/unity.Drakhar Studio.Ginger: Beyond the Crystal/*.prefs":
|
|
||||||
when:
|
|
||||||
- os: mac
|
|
||||||
store: steam
|
|
||||||
installDir:
|
installDir:
|
||||||
Ginger Beyond the Crystal: {}
|
Ginger Beyond the Crystal: {}
|
||||||
launch:
|
launch:
|
||||||
|
@ -348016,10 +347991,6 @@ Liberté:
|
||||||
"<home>/AppData/LocalLow/Superstatic/Liberte/Save":
|
"<home>/AppData/LocalLow/Superstatic/Liberte/Save":
|
||||||
when:
|
when:
|
||||||
- store: steam
|
- store: steam
|
||||||
"<xdgData>/deck/.local/share/Steam/steamapps/compatdata/1590160/pfx/dosdevices/c:/users/steamuser/AppData/LocalLow/Superstatic/Liberte/Save":
|
|
||||||
when:
|
|
||||||
- os: linux
|
|
||||||
store: steam
|
|
||||||
gog:
|
gog:
|
||||||
id: 1355106030
|
id: 1355106030
|
||||||
installDir:
|
installDir:
|
||||||
|
|
|
@ -772,6 +772,7 @@
|
||||||
* [After Rain: Phoenix Rise](https://www.pcgamingwiki.com/wiki/?curid=69749)
|
* [After Rain: Phoenix Rise](https://www.pcgamingwiki.com/wiki/?curid=69749)
|
||||||
* [After Reset RPG](https://www.pcgamingwiki.com/wiki/?curid=48497)
|
* [After Reset RPG](https://www.pcgamingwiki.com/wiki/?curid=48497)
|
||||||
* [After the Empire](https://www.pcgamingwiki.com/wiki/?curid=60227)
|
* [After the Empire](https://www.pcgamingwiki.com/wiki/?curid=60227)
|
||||||
|
* [After the End: The Harvest](https://www.pcgamingwiki.com/wiki/?curid=47297)
|
||||||
* [After the Fall](https://www.pcgamingwiki.com/wiki/?curid=140514)
|
* [After the Fall](https://www.pcgamingwiki.com/wiki/?curid=140514)
|
||||||
* [After the Inferno](https://www.pcgamingwiki.com/wiki/?curid=180244)
|
* [After the Inferno](https://www.pcgamingwiki.com/wiki/?curid=180244)
|
||||||
* [After The Suns](https://www.pcgamingwiki.com/wiki/?curid=139035)
|
* [After The Suns](https://www.pcgamingwiki.com/wiki/?curid=139035)
|
||||||
|
@ -2881,6 +2882,7 @@
|
||||||
* [Bionic Hunter VR](https://www.pcgamingwiki.com/wiki/?curid=153786)
|
* [Bionic Hunter VR](https://www.pcgamingwiki.com/wiki/?curid=153786)
|
||||||
* [BionicBlitz](https://www.pcgamingwiki.com/wiki/?curid=128134)
|
* [BionicBlitz](https://www.pcgamingwiki.com/wiki/?curid=128134)
|
||||||
* [Bionite: Origins](https://www.pcgamingwiki.com/wiki/?curid=45146)
|
* [Bionite: Origins](https://www.pcgamingwiki.com/wiki/?curid=45146)
|
||||||
|
* [Bios Ex - Yami no Wakusei](https://www.pcgamingwiki.com/wiki/?curid=128708)
|
||||||
* [Biosupremacy](https://www.pcgamingwiki.com/wiki/?curid=58914)
|
* [Biosupremacy](https://www.pcgamingwiki.com/wiki/?curid=58914)
|
||||||
* [BIOSZARD Corporation](https://www.pcgamingwiki.com/wiki/?curid=130297)
|
* [BIOSZARD Corporation](https://www.pcgamingwiki.com/wiki/?curid=130297)
|
||||||
* [Biotix: Phage Genesis](https://www.pcgamingwiki.com/wiki/?curid=91126)
|
* [Biotix: Phage Genesis](https://www.pcgamingwiki.com/wiki/?curid=91126)
|
||||||
|
|
|
@ -270,7 +270,7 @@ impl Game {
|
||||||
|
|
||||||
fn add_file_constraint(&mut self, path: String, constraint: GameFileConstraint) {
|
fn add_file_constraint(&mut self, path: String, constraint: GameFileConstraint) {
|
||||||
let path = path::normalize(&path);
|
let path = path::normalize(&path);
|
||||||
if path::usable(&path) {
|
if path::usable(&path) && !path.contains(':') {
|
||||||
self.files.entry(path).or_default().when.insert(constraint);
|
self.files.entry(path).or_default().when.insert(constraint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
28
src/path.rs
28
src/path.rs
|
@ -47,17 +47,17 @@ pub fn normalize(path: &str) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn too_broad(path: &str) -> bool {
|
pub fn too_broad(path: &str) -> bool {
|
||||||
use placeholder::{BASE, HOME, ROOT, STORE_USER_ID, WIN_DIR, WIN_DOCUMENTS};
|
use placeholder::{BASE, HOME, ROOT, STORE_USER_ID, WIN_DIR, WIN_DOCUMENTS, XDG_CONFIG, XDG_DATA};
|
||||||
|
|
||||||
for placeholder in placeholder::ALL {
|
for item in placeholder::ALL {
|
||||||
if path == *placeholder {
|
if path == *item {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// These paths are present whether or not the game is installed.
|
// These paths are present whether or not the game is installed.
|
||||||
// If possible, they should be narrowed down on the wiki.
|
// If possible, they should be narrowed down on the wiki.
|
||||||
let broad = vec![
|
for item in [
|
||||||
format!("{BASE}/{STORE_USER_ID}"), // because `<storeUserId>` is handled as `*`
|
format!("{BASE}/{STORE_USER_ID}"), // because `<storeUserId>` is handled as `*`
|
||||||
format!("{HOME}/Documents"),
|
format!("{HOME}/Documents"),
|
||||||
format!("{HOME}/Saved Games"),
|
format!("{HOME}/Saved Games"),
|
||||||
|
@ -75,15 +75,25 @@ pub fn too_broad(path: &str) -> bool {
|
||||||
format!("{WIN_DIR}/SysWOW64"),
|
format!("{WIN_DIR}/SysWOW64"),
|
||||||
format!("{WIN_DOCUMENTS}/My Games"),
|
format!("{WIN_DOCUMENTS}/My Games"),
|
||||||
format!("{WIN_DOCUMENTS}/Telltale Games"),
|
format!("{WIN_DOCUMENTS}/Telltale Games"),
|
||||||
|
format!("{XDG_CONFIG}/unity3d"),
|
||||||
|
format!("{XDG_DATA}/unity3d"),
|
||||||
"C:/Program Files".to_string(),
|
"C:/Program Files".to_string(),
|
||||||
];
|
"C:/Program Files (x86)".to_string(),
|
||||||
if broad.iter().any(|x| *x == path) {
|
] {
|
||||||
return true;
|
if path == item {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Several games/episodes are grouped together here.
|
// Several games/episodes are grouped together here.
|
||||||
if path.starts_with(&format!("{WIN_DOCUMENTS}/Telltale Games/*/")) {
|
for item in [
|
||||||
return true;
|
format!("{WIN_DOCUMENTS}/Telltale Games/*/"),
|
||||||
|
format!("{XDG_CONFIG}/unity3d/*"),
|
||||||
|
format!("{XDG_DATA}/unity3d/*"),
|
||||||
|
] {
|
||||||
|
if path.starts_with(&item) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Drive letters:
|
// Drive letters:
|
||||||
|
|
Reference in a new issue