Skip to content

Commit

Permalink
Fix issue of language file not being able to be downloaded on first-run
Browse files Browse the repository at this point in the history
  • Loading branch information
Tudi20 committed Oct 6, 2021
1 parent fe8417d commit c3c2f0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Universal THCRAP Launcher/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,8 @@ private bool InitChecks()
//Load config
string lang_code = System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName;

if (!Directory.Exists(I18N.I18NDir)) Directory.CreateDirectory(I18N.I18NDir);

if (File.Exists(CONFIG_FILE))
{
var settings = new JsonSerializerSettings { ObjectCreationHandling = ObjectCreationHandling.Replace };
Expand All @@ -1123,8 +1125,6 @@ private bool InitChecks()
lang_code = DownloadTranslation(lang_code);
}

if (!Directory.Exists(I18N.I18NDir)) Directory.CreateDirectory(I18N.I18NDir);

//Load language
if (dconfig == null || !(dconfig is dynamic) || String.IsNullOrEmpty((string)(dconfig.Lang.Value)))
{
Expand Down

0 comments on commit c3c2f0f

Please sign in to comment.