修复标题中无合法字符时崩溃的问题 #1143

This commit is contained in:
leiurayer 2025-02-05 20:36:14 +08:00
parent e0ac25efbc
commit 2c227d5d26

View File

@ -199,7 +199,7 @@ namespace DownKyi.Core.Utils
destName = Regex.Replace(destName, @"\p{C}+", string.Empty);
// 如果只有空白字符、dot符
if (destName == " " || destName == ".")
if (string.IsNullOrWhiteSpace(destName) || destName == ".")
{
return "[empty title]";
}