mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
fix(config): 解决目录列表加载错误问题
- 添加了 ListDirBegin 方法的错误检查 - 在遇到错误时返回 null 避免异常 - 确保目录遍历前检查操作状态
This commit is contained in:
parent
abf78aa934
commit
1c064bfe66
@ -623,7 +623,12 @@ internal sealed class GodotYamlConfigEnvironment
|
|||||||
}
|
}
|
||||||
|
|
||||||
var entries = new List<GodotYamlConfigDirectoryEntry>();
|
var entries = new List<GodotYamlConfigDirectoryEntry>();
|
||||||
directory.ListDirBegin();
|
var listDirectoryError = directory.ListDirBegin();
|
||||||
|
if (listDirectoryError != Error.Ok)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
var name = directory.GetNext();
|
var name = directory.GetNext();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user