diff --git a/data/manifest.yaml b/data/manifest.yaml index d78bdf84..abcb32d1 100644 --- a/data/manifest.yaml +++ b/data/manifest.yaml @@ -122147,7 +122147,7 @@ Colossal Saga: id: 1181820 Colossals: files: - "/ /*.rvdata2": + "/*.rvdata2": when: - store: steam installDir: @@ -162605,7 +162605,7 @@ Derail Valley: id: 588030 Derange: files: - "/ /*.rvdata2": + "/*.rvdata2": when: - store: steam installDir: @@ -275676,7 +275676,7 @@ Hardy Only One: id: 726170 Hare: files: - "/ /**/*.ini": + "/**/*.ini": when: - store: steam installDir: @@ -344536,7 +344536,7 @@ Legions of Tyrandel: - os: windows "Legionwood 1: Tale of the Two Swords": files: - "/ /*.rvdata": + "/*.rvdata": when: - store: steam installDir: @@ -502555,13 +502555,13 @@ Rogue Port - Red Nightmare: id: 728420 Rogue Rails: files: - "/ /*.cfg": + "/*.cfg": when: - store: steam - "/ /*.dat": + "/*.dat": when: - store: steam - "/ /*.sav": + "/*.sav": when: - store: steam "/AppData/LocalLow/FlowenProductions/RogueRails/*.cfg": @@ -510564,7 +510564,7 @@ SHEEP.IO: id: 1078870 SHELL: files: - "/ /*.sav": + "/*.sav": when: - store: steam installDir: @@ -543411,11 +543411,11 @@ Slingshot Hero VR: id: 678170 Slingshot People: files: - "/SteamApps/common/windows_content/ /SteamApps/common/windows_content/SavesDir/**/sav": + "/SteamApps/common/windows_content/SavesDir/**/sav": when: - os: windows store: steam - "/SteamApps/common/windows_content/SavesDir/**/sav": + "/SteamApps/common/windows_content/SteamApps/common/windows_content/SavesDir/**/sav": when: - os: windows store: steam diff --git a/src/path.rs b/src/path.rs index f5d193d1..b8d29e87 100644 --- a/src/path.rs +++ b/src/path.rs @@ -16,6 +16,7 @@ pub fn normalize(path: &str) -> String { static ENDING_WILDCARD: Lazy = Lazy::new(|| Regex::new(r"(/\*)+$").unwrap()); static ENDING_DOT: Lazy = Lazy::new(|| Regex::new(r"(/\.)$").unwrap()); static INTERMEDIATE_DOT: Lazy = Lazy::new(|| Regex::new(r"(/\./)").unwrap()); + static BLANK_SEGMENT: Lazy = Lazy::new(|| Regex::new(r"(/\s+/)").unwrap()); static APP_DATA: Lazy = Lazy::new(|| Regex::new(r"(?i)%appdata%").unwrap()); static APP_DATA_ROAMING: Lazy = Lazy::new(|| Regex::new(r"(?i)%userprofile%/AppData/Roaming").unwrap()); static APP_DATA_LOCAL: Lazy = 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),