From 59ffa55340304a65514f125d5d7b4e087fc86724 Mon Sep 17 00:00:00 2001 From: "Wesley Pyburn (TechNobo)" <10319195+TcNobo@users.noreply.github.com> Date: Tue, 6 Jul 2021 17:54:19 +0200 Subject: [PATCH] Hotfix: Discord not passing password - Fixed not creating Discord LoginCache folder. --- TcNo-Acc-Switcher-Globals/Globals.cs | 2 +- .../Pages/General/GeneralInvocableFuncs.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TcNo-Acc-Switcher-Globals/Globals.cs b/TcNo-Acc-Switcher-Globals/Globals.cs index d1eca6a73..31fb3edce 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-07-06_00"; + public static readonly string Version = "2021-07-06_01"; public static readonly string[] PlatformList = {"Steam", "Origin", "Ubisoft", "BattleNet", "Epic", "Riot", "Discord"}; #region LOGGER diff --git a/TcNo-Acc-Switcher-Server/Pages/General/GeneralInvocableFuncs.cs b/TcNo-Acc-Switcher-Server/Pages/General/GeneralInvocableFuncs.cs index f30804cd0..b9d6c2bd9 100644 --- a/TcNo-Acc-Switcher-Server/Pages/General/GeneralInvocableFuncs.cs +++ b/TcNo-Acc-Switcher-Server/Pages/General/GeneralInvocableFuncs.cs @@ -453,7 +453,9 @@ public static int GiCheckPlatformPassword(string platform) [JSInvokable] public static bool GiVerifyPlatformPassword(string platform, string password) { - var passFile = Path.Join(Globals.UserDataFolder, "LoginCache", platform, "pass"); + var passFolder = Path.Join(Globals.UserDataFolder, "LoginCache", platform); + Directory.CreateDirectory(passFolder); + var passFile = Path.Join(passFolder, "pass"); var hashedPass = Globals.GetSha256HashString(password); if (File.Exists(passFile))