From 73329330d3ecc40d06f40d95e467c6e941927c74 Mon Sep 17 00:00:00 2001 From: Alstruit <34786806+Alstruit@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:40:58 -0600 Subject: [PATCH] Address Config already loaded error. --- DepotDownloader/ContentDownloader.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index c55ef215..7f1ce472 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -440,14 +440,17 @@ namespace DepotDownloader cdnPool = new CDNClientPool(steam3, appId); // Load our configuration data containing the depots currently installed - var configPath = Config.InstallDirectory; - if (string.IsNullOrWhiteSpace(configPath)) + if (DepotConfigStore.Instance == null) { - configPath = DEFAULT_DOWNLOAD_DIR; - } + var configPath = Config.InstallDirectory; + if (string.IsNullOrWhiteSpace(configPath)) + { + configPath = DEFAULT_DOWNLOAD_DIR; + } - Directory.CreateDirectory(Path.Combine(configPath, CONFIG_DIR)); - DepotConfigStore.LoadFromFile(Path.Combine(configPath, CONFIG_DIR, "depot.config")); + Directory.CreateDirectory(Path.Combine(configPath, CONFIG_DIR)); + DepotConfigStore.LoadFromFile(Path.Combine(configPath, CONFIG_DIR, "depot.config")); + } await steam3?.RequestAppInfo(appId);