From e259f9e32f6991fedd0f45234087b891e6cc269c Mon Sep 17 00:00:00 2001 From: Archi Date: Sat, 11 Dec 2021 15:17:28 +0100 Subject: [PATCH] STD: Misc --- .../GlobalCache.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs index babc4ddba..bac14d3a4 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs @@ -96,11 +96,7 @@ internal sealed class GlobalCache : SerializableFile { internal static async Task Load() { if (!File.Exists(SharedFilePath)) { - GlobalCache result = new(); - - Utilities.InBackground(result.Save); - - return result; + return new GlobalCache(); } ASF.ArchiLogger.LogGenericInfo(Localization.Strings.LoadingGlobalCache); @@ -132,11 +128,9 @@ internal sealed class GlobalCache : SerializableFile { ASF.ArchiLogger.LogGenericInfo(Localization.Strings.ValidatingGlobalCacheIntegrity); if (globalCache.DepotKeys.Values.Any(static depotKey => !IsValidDepotKey(depotKey))) { - ASF.ArchiLogger.LogGenericWarning(Localization.Strings.GlobalCacheIntegrityValidationFailed); + ASF.ArchiLogger.LogGenericError(Localization.Strings.GlobalCacheIntegrityValidationFailed); - globalCache = new GlobalCache(); - - Utilities.InBackground(globalCache.Save); + return null; } return globalCache;