Skip to content

Commit

Permalink
Adapt the new profile format
Browse files Browse the repository at this point in the history
Fixed: Profile formats not using the new folder structure.
  • Loading branch information
David-JonesDVN committed Mar 10, 2020
1 parent e063158 commit 9fbc524
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Touhou Launcher/thcrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private void thcrap_Load(object sender, EventArgs e)
foreach (Dictionary<string, string> patch in profile.patches)
{
if (!patchStates.Contains(patch["archive"]))
patchStates.Add(patch["archive"]);
patchStates.Add(patch["archive"].Substring(6));
}
}
foreach (string localRepo in Directory.GetFiles(MainForm.curCfg.crapDir + "\\repos", "repo.js", SearchOption.AllDirectories))
Expand Down Expand Up @@ -229,7 +229,7 @@ private void thcrap_Closing(object sender, FormClosingEventArgs e)
profileData profile = new profileData();
foreach (string patch in patchStates)
{
profile.patches.Add(new Dictionary<string, string> { {"archive", patch} });
profile.patches.Add(new Dictionary<string, string> { {"archive", "repos/" + patch} });
}
File.WriteAllText(gamejs, JsonConvert.SerializeObject(profile, Formatting.Indented));
Dictionary<string, string> games = new Dictionary<string, string>();
Expand Down

0 comments on commit 9fbc524

Please sign in to comment.