Filter out blank segments

This commit is contained in:
mtkennerly 2024-04-22 10:31:09 -04:00
parent a2e6beb30e
commit 665f623bbe
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
2 changed files with 12 additions and 10 deletions

View file

@ -122147,7 +122147,7 @@ Colossal Saga:
id: 1181820 id: 1181820
Colossals: Colossals:
files: files:
"<base>/ /*.rvdata2": "<base>/*.rvdata2":
when: when:
- store: steam - store: steam
installDir: installDir:
@ -162605,7 +162605,7 @@ Derail Valley:
id: 588030 id: 588030
Derange: Derange:
files: files:
"<base>/ /*.rvdata2": "<base>/*.rvdata2":
when: when:
- store: steam - store: steam
installDir: installDir:
@ -275676,7 +275676,7 @@ Hardy Only One:
id: 726170 id: 726170
Hare: Hare:
files: files:
"<base>/ /**/*.ini": "<base>/**/*.ini":
when: when:
- store: steam - store: steam
installDir: installDir:
@ -344536,7 +344536,7 @@ Legions of Tyrandel:
- os: windows - os: windows
"Legionwood 1: Tale of the Two Swords": "Legionwood 1: Tale of the Two Swords":
files: files:
"<base>/ /*.rvdata": "<base>/*.rvdata":
when: when:
- store: steam - store: steam
installDir: installDir:
@ -502555,13 +502555,13 @@ Rogue Port - Red Nightmare:
id: 728420 id: 728420
Rogue Rails: Rogue Rails:
files: files:
"<base>/ /*.cfg": "<base>/*.cfg":
when: when:
- store: steam - store: steam
"<base>/ /*.dat": "<base>/*.dat":
when: when:
- store: steam - store: steam
"<base>/ /*.sav": "<base>/*.sav":
when: when:
- store: steam - store: steam
"<home>/AppData/LocalLow/FlowenProductions/RogueRails/*.cfg": "<home>/AppData/LocalLow/FlowenProductions/RogueRails/*.cfg":
@ -510564,7 +510564,7 @@ SHEEP.IO:
id: 1078870 id: 1078870
SHELL: SHELL:
files: files:
"<base>/ /*.sav": "<base>/*.sav":
when: when:
- store: steam - store: steam
installDir: installDir:
@ -543411,11 +543411,11 @@ Slingshot Hero VR:
id: 678170 id: 678170
Slingshot People: Slingshot People:
files: files:
"<base>/SteamApps/common/windows_content/ /SteamApps/common/windows_content/SavesDir/**/sav": "<base>/SteamApps/common/windows_content/SavesDir/**/sav":
when: when:
- os: windows - os: windows
store: steam store: steam
"<base>/SteamApps/common/windows_content/SavesDir/**/sav": "<base>/SteamApps/common/windows_content/SteamApps/common/windows_content/SavesDir/**/sav":
when: when:
- os: windows - os: windows
store: steam store: steam

View file

@ -16,6 +16,7 @@ pub fn normalize(path: &str) -> String {
static ENDING_WILDCARD: Lazy<Regex> = Lazy::new(|| Regex::new(r"(/\*)+$").unwrap()); static ENDING_WILDCARD: Lazy<Regex> = Lazy::new(|| Regex::new(r"(/\*)+$").unwrap());
static ENDING_DOT: Lazy<Regex> = Lazy::new(|| Regex::new(r"(/\.)$").unwrap()); static ENDING_DOT: Lazy<Regex> = Lazy::new(|| Regex::new(r"(/\.)$").unwrap());
static INTERMEDIATE_DOT: Lazy<Regex> = Lazy::new(|| Regex::new(r"(/\./)").unwrap()); static INTERMEDIATE_DOT: Lazy<Regex> = Lazy::new(|| Regex::new(r"(/\./)").unwrap());
static BLANK_SEGMENT: Lazy<Regex> = Lazy::new(|| Regex::new(r"(/\s+/)").unwrap());
static APP_DATA: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?i)%appdata%").unwrap()); static APP_DATA: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?i)%appdata%").unwrap());
static APP_DATA_ROAMING: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?i)%userprofile%/AppData/Roaming").unwrap()); static APP_DATA_ROAMING: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?i)%userprofile%/AppData/Roaming").unwrap());
static APP_DATA_LOCAL: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?i)%localappdata%").unwrap()); static APP_DATA_LOCAL: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?i)%localappdata%").unwrap());
@ -30,6 +31,7 @@ pub fn normalize(path: &str) -> String {
(&ENDING_WILDCARD, ""), (&ENDING_WILDCARD, ""),
(&ENDING_DOT, ""), (&ENDING_DOT, ""),
(&INTERMEDIATE_DOT, "/"), (&INTERMEDIATE_DOT, "/"),
(&BLANK_SEGMENT, "/"),
(&APP_DATA, placeholder::WIN_APP_DATA), (&APP_DATA, placeholder::WIN_APP_DATA),
(&APP_DATA_ROAMING, placeholder::WIN_APP_DATA), (&APP_DATA_ROAMING, placeholder::WIN_APP_DATA),
(&APP_DATA_LOCAL, placeholder::WIN_LOCAL_APP_DATA), (&APP_DATA_LOCAL, placeholder::WIN_LOCAL_APP_DATA),