Skip to content

Commit

Permalink
Merge pull request #64 from mhbalthasar/master
Browse files Browse the repository at this point in the history
添加了翻译资源目录不存在时的Bypass
  • Loading branch information
LiuYunPlayer authored Jul 19, 2024
2 parents 1254c44 + a0fc5fb commit dfaa609
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 dfaa609

Please sign in to comment.