diff --git a/CreamInstaller/Classes/SteamCMD.cs b/CreamInstaller/Classes/SteamCMD.cs index ab20839..f48aafe 100644 --- a/CreamInstaller/Classes/SteamCMD.cs +++ b/CreamInstaller/Classes/SteamCMD.cs @@ -83,8 +83,8 @@ internal static class SteamCMD string appUpdateFile = $@"{appUpdatePath}\appinfo.txt"; restart: if (Program.Canceled) return null; - if (Directory.Exists(appUpdatePath) && File.Exists(appUpdateFile)) - output = File.ReadAllText(appUpdateFile, Encoding.UTF8); + if (!Directory.Exists(appUpdatePath)) Directory.CreateDirectory(appUpdatePath); + if (File.Exists(appUpdateFile)) output = File.ReadAllText(appUpdateFile, Encoding.UTF8); else { output = await Run($@"+@ShutdownOnFailedCommand 0 +login anonymous +app_info_print {appId} +force_install_dir {appUpdatePath} +app_update 4 +quit"); @@ -99,11 +99,8 @@ internal static class SteamCMD if (Program.Canceled || output is null) return null; if (!ValveDataFile.TryDeserialize(output, out VProperty appInfo)) { - if (Directory.Exists(appUpdatePath)) - { - Directory.Delete(appUpdatePath, true); - goto restart; - } + Directory.Delete(appUpdatePath, true); + goto restart; } if (appInfo.Value is VValue) goto restart; if (appInfo is null || appInfo.Value?.Children()?.ToList()?.Count == 0) return appInfo; diff --git a/CreamInstaller/CreamInstaller.csproj b/CreamInstaller/CreamInstaller.csproj index a5c5433..f58ed82 100644 --- a/CreamInstaller/CreamInstaller.csproj +++ b/CreamInstaller/CreamInstaller.csproj @@ -5,7 +5,7 @@ true Resources\ini.ico true - 2.2.4.3 + 2.2.4.4 Resources\ini.ico Automatically generates and installs CreamAPI files for Steam games on the user's computer. It can also generate and install CreamAPI for the Paradox Launcher should the user select a Paradox Interactive game.