Skip to content

Commit

Permalink
添加了翻译资源目录不存在时的Bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
mhbalthasar committed Jul 19, 2024
1 parent 1254c44 commit a0fc5fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TuneLab/I18N/TranslationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ static TranslationManager()

public static void Init(string path)
{
foreach (var file in new DirectoryInfo(path).GetFiles("*.toml"))
DirectoryInfo resDir = new DirectoryInfo(path);
if (!resDir.Exists) return;
foreach (var file in resDir.GetFiles("*.toml"))
{
var i18nName = Path.GetFileNameWithoutExtension(file.FullName);
if (mTranslators.ContainsKey(i18nName))
Expand Down

0 comments on commit a0fc5fb

Please sign in to comment.