Filter out blank segments
This commit is contained in:
parent
a2e6beb30e
commit
665f623bbe
2 changed files with 12 additions and 10 deletions
|
@ -122147,7 +122147,7 @@ Colossal Saga:
|
|||
id: 1181820
|
||||
Colossals:
|
||||
files:
|
||||
"<base>/ /*.rvdata2":
|
||||
"<base>/*.rvdata2":
|
||||
when:
|
||||
- store: steam
|
||||
installDir:
|
||||
|
@ -162605,7 +162605,7 @@ Derail Valley:
|
|||
id: 588030
|
||||
Derange:
|
||||
files:
|
||||
"<base>/ /*.rvdata2":
|
||||
"<base>/*.rvdata2":
|
||||
when:
|
||||
- store: steam
|
||||
installDir:
|
||||
|
@ -275676,7 +275676,7 @@ Hardy Only One:
|
|||
id: 726170
|
||||
Hare:
|
||||
files:
|
||||
"<base>/ /**/*.ini":
|
||||
"<base>/**/*.ini":
|
||||
when:
|
||||
- store: steam
|
||||
installDir:
|
||||
|
@ -344536,7 +344536,7 @@ Legions of Tyrandel:
|
|||
- os: windows
|
||||
"Legionwood 1: Tale of the Two Swords":
|
||||
files:
|
||||
"<base>/ /*.rvdata":
|
||||
"<base>/*.rvdata":
|
||||
when:
|
||||
- store: steam
|
||||
installDir:
|
||||
|
@ -502555,13 +502555,13 @@ Rogue Port - Red Nightmare:
|
|||
id: 728420
|
||||
Rogue Rails:
|
||||
files:
|
||||
"<base>/ /*.cfg":
|
||||
"<base>/*.cfg":
|
||||
when:
|
||||
- store: steam
|
||||
"<base>/ /*.dat":
|
||||
"<base>/*.dat":
|
||||
when:
|
||||
- store: steam
|
||||
"<base>/ /*.sav":
|
||||
"<base>/*.sav":
|
||||
when:
|
||||
- store: steam
|
||||
"<home>/AppData/LocalLow/FlowenProductions/RogueRails/*.cfg":
|
||||
|
@ -510564,7 +510564,7 @@ SHEEP.IO:
|
|||
id: 1078870
|
||||
SHELL:
|
||||
files:
|
||||
"<base>/ /*.sav":
|
||||
"<base>/*.sav":
|
||||
when:
|
||||
- store: steam
|
||||
installDir:
|
||||
|
@ -543411,11 +543411,11 @@ Slingshot Hero VR:
|
|||
id: 678170
|
||||
Slingshot People:
|
||||
files:
|
||||
"<base>/SteamApps/common/windows_content/ /SteamApps/common/windows_content/SavesDir/**/sav":
|
||||
"<base>/SteamApps/common/windows_content/SavesDir/**/sav":
|
||||
when:
|
||||
- os: windows
|
||||
store: steam
|
||||
"<base>/SteamApps/common/windows_content/SavesDir/**/sav":
|
||||
"<base>/SteamApps/common/windows_content/SteamApps/common/windows_content/SavesDir/**/sav":
|
||||
when:
|
||||
- os: windows
|
||||
store: steam
|
||||
|
|
|
@ -16,6 +16,7 @@ pub fn normalize(path: &str) -> String {
|
|||
static ENDING_WILDCARD: 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 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_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());
|
||||
|
@ -30,6 +31,7 @@ pub fn normalize(path: &str) -> String {
|
|||
(&ENDING_WILDCARD, ""),
|
||||
(&ENDING_DOT, ""),
|
||||
(&INTERMEDIATE_DOT, "/"),
|
||||
(&BLANK_SEGMENT, "/"),
|
||||
(&APP_DATA, placeholder::WIN_APP_DATA),
|
||||
(&APP_DATA_ROAMING, placeholder::WIN_APP_DATA),
|
||||
(&APP_DATA_LOCAL, placeholder::WIN_LOCAL_APP_DATA),
|
||||
|
|
Reference in a new issue