Try to fix

https://github.com/2dust/v2rayN/issues/6186
This commit is contained in:
2dust
2024-12-05 10:12:26 +08:00
parent fd8f863c5b
commit 3f2ab8ddcb
3 changed files with 39 additions and 39 deletions
+5 -4
View File
@@ -46,11 +46,13 @@
public bool InitApp()
{
_config = ConfigHandler.LoadConfig();
if (_config == null)
Logging.Setup();
var config = ConfigHandler.LoadConfig();
if (config == null)
{
return false;
}
_config = config;
Thread.CurrentThread.CurrentUICulture = new(_config.UiItem.CurrentLanguage);
//Under Win10
@@ -70,10 +72,9 @@
public bool InitComponents()
{
Logging.Setup();
Logging.LoggingEnabled(_config.GuiItem.EnableLog);
Logging.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
Logging.SaveLog($"{Environment.OSVersion} - {(Environment.Is64BitOperatingSystem ? 64 : 32)}");
Logging.LoggingEnabled(_config.GuiItem.EnableLog);
Logging.ClearLogs();
return true;