Skip to content

Commit

Permalink
Installers: Fix Steam library manifest parsing. Fixes OpenRA#21129
Browse files Browse the repository at this point in the history
  • Loading branch information
tinix0 authored and PunkPun committed Nov 4, 2023
1 parent e83e580 commit 3be1de2
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 3be1de2

Please sign in to comment.