From 9fbc524d93a8347a49c197f47023a31a36d309a4 Mon Sep 17 00:00:00 2001 From: David_JonesDVN Date: Tue, 10 Mar 2020 19:43:43 +0330 Subject: [PATCH] Adapt the new profile format Fixed: Profile formats not using the new folder structure. --- Touhou Launcher/thcrap.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Touhou Launcher/thcrap.cs b/Touhou Launcher/thcrap.cs index 28e960c..dfc7987 100644 --- a/Touhou Launcher/thcrap.cs +++ b/Touhou Launcher/thcrap.cs @@ -92,7 +92,7 @@ private void thcrap_Load(object sender, EventArgs e) foreach (Dictionary 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)) @@ -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 { {"archive", patch} }); + profile.patches.Add(new Dictionary { {"archive", "repos/" + patch} }); } File.WriteAllText(gamejs, JsonConvert.SerializeObject(profile, Formatting.Indented)); Dictionary games = new Dictionary();