From 15e2170100ab4f80ddbd80bd0bd1b6a2e2361c98 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Mon, 3 Feb 2020 08:21:42 -0600 Subject: [PATCH] just a small fix that I forgot to include in the last build. --- Application/Main.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Application/Main.cs b/Application/Main.cs index c37392ce..b96961fa 100644 --- a/Application/Main.cs +++ b/Application/Main.cs @@ -68,15 +68,15 @@ namespace IW4MAdmin.Application ITranslationLookup translationLookup = null; try { + // do any needed housekeeping file/folder migrations + ConfigurationMigration.MoveConfigFolder10518(null); + ConfigurationMigration.CheckDirectories(); + var services = ConfigureServices(); serviceProvider = services.BuildServiceProvider(); ServerManager = (ApplicationManager)serviceProvider.GetRequiredService(); translationLookup = serviceProvider.GetRequiredService(); - // do any needed housekeeping file/folder migrations - ConfigurationMigration.MoveConfigFolder10518(null); - ConfigurationMigration.CheckDirectories(); - ServerManager.Logger.WriteInfo(Utilities.CurrentLocalization.LocalizationIndex["MANAGER_VERSION"].FormatExt(Version)); await CheckVersion(translationLookup); @@ -97,7 +97,10 @@ namespace IW4MAdmin.Application if (e is ConfigurationException configException) { - Console.WriteLine(translationLookup[configException.Message].FormatExt(configException.ConfigurationFileName)); + if (translationLookup != null) + { + Console.WriteLine(translationLookup[configException.Message].FormatExt(configException.ConfigurationFileName)); + } foreach (string error in configException.Errors) {