Skip to content

Commit 43f2df1

Browse files
committed
fix(GlobalSettings): 修复配置文件加载失败时的日志显示顺序
在文件不存在时,先获取完整路径并显示加载日志,再显示失败信息,避免路径信息缺失
1 parent 396a7b1 commit 43f2df1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

GameFrameX.Utility/Setting/GlobalSettings.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ public static void Load(string path)
7979
return;
8080
}
8181

82+
var fullPath = Path.GetFullPath(path);
83+
LogHelper.ShowOption("Load Global Settings", fullPath);
8284
if (!File.Exists(path))
8385
{
84-
var fullPath = Path.GetFullPath(path);
85-
LogHelper.ShowOption("Load Global Settings", fullPath);
86+
LogHelper.ShowOption("Load Global Settings Failed", $"Failed to load the configuration file.(加载配置文件失败)");
8687
return;
8788
}
8889

0 commit comments

Comments
 (0)