diff --git a/TcNo-Acc-Switcher-Globals/Globals.cs b/TcNo-Acc-Switcher-Globals/Globals.cs index cce6afa76..c99268988 100644 --- a/TcNo-Acc-Switcher-Globals/Globals.cs +++ b/TcNo-Acc-Switcher-Globals/Globals.cs @@ -23,7 +23,7 @@ public class Globals #pragma warning disable CA2211 // Non-constant fields should not be visible - This is necessary due to it being a launch parameter. public static bool VerboseMode; #pragma warning restore CA2211 // Non-constant fields should not be visible - public static readonly string Version = "2021-06-28_01"; + public static readonly string Version = "2021-06-28_02"; public static readonly string[] PlatformList = {"Steam", "Origin", "Ubisoft", "BattleNet", "Epic", "Riot"}; #region LOGGER diff --git a/TcNo-Acc-Switcher-Updater/MainWindow.xaml.cs b/TcNo-Acc-Switcher-Updater/MainWindow.xaml.cs index ee619e21e..f003294fb 100644 --- a/TcNo-Acc-Switcher-Updater/MainWindow.xaml.cs +++ b/TcNo-Acc-Switcher-Updater/MainWindow.xaml.cs @@ -867,8 +867,10 @@ private static void ApplyPatches(string oldFolder, string outputFolder) foreach (var p in _patchList) { var relativePath = p.Remove(0, p.Split("\\")[0].Length + 1); - var patchFile = Path.Join(outputFolder, "patches", relativePath); - var patchedFile = Path.Join(outputFolder, "patched", relativePath); + var patchFile = Path.Join(outputFolder, "patches", relativePath); // Necessary fix for pre 2021-06-28_01 versions to update using this new updater. + if (relativePath.StartsWith("wwwroot")) + relativePath = relativePath.Replace("wwwroot", "originalwwwroot"); + var patchedFile = Path.Join(outputFolder, "patched", relativePath); Directory.CreateDirectory(Path.GetDirectoryName(patchedFile)!); DoDecode(Path.Join(oldFolder, relativePath), patchFile, patchedFile); }