Skip to content

Commit

Permalink
Installers: Fix Steam library manifest parsing. Fixes #21129
Browse files Browse the repository at this point in the history
  • Loading branch information
tinix0 committed Oct 29, 2023
1 parent c427e24 commit eb03445
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,15 @@ static IEnumerable<string> SteamDirectory()
continue;

foreach (var e in ParseLibraryManifest(libraryFoldersPath).Where(e => e.Item1 == "path"))
yield return e.Item2;
yield return Unescape(e.Item2);
}
}

static string Unescape(string path)
{
return path.Replace(@"\\", @"\");
}

static Dictionary<string, string> ParseGameManifest(string path)
{
var regex = new Regex("^\\s*\"(?<key>[^\"]*)\"\\s*\"(?<value>[^\"]*)\"\\s*$");
Expand Down

0 comments on commit eb03445

Please sign in to comment.