From d15175f62993631aea7a24cd622201c72d90432e Mon Sep 17 00:00:00 2001 From: leiurayer <1432593898@qq.com> Date: Thu, 13 Jul 2023 23:11:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E9=97=AA=E9=80=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DownKyi.Core/Utils/Format.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DownKyi.Core/Utils/Format.cs b/src/DownKyi.Core/Utils/Format.cs index fcde0f6..14653ef 100644 --- a/src/DownKyi.Core/Utils/Format.cs +++ b/src/DownKyi.Core/Utils/Format.cs @@ -198,6 +198,12 @@ namespace DownKyi.Core.Utils // 控制字符 destName = Regex.Replace(destName, @"\p{C}+", string.Empty); + // 如果只有空白字符、dot符 + if (destName == " " || destName == ".") + { + return "[empty title]"; + } + // 移除前导和尾部的空白字符、dot符 int i, j; for (i = 0; i < destName.Length; i++)