From 5ab4f410e9dc5dc752d1cb40da930a489b99d838 Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Wed, 15 Jan 2025 22:38:04 +0800 Subject: [PATCH] Fix conflict --- WzComparerR2/MainForm.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/WzComparerR2/MainForm.cs b/WzComparerR2/MainForm.cs index 3adbb7d8..49c478d7 100644 --- a/WzComparerR2/MainForm.cs +++ b/WzComparerR2/MainForm.cs @@ -3784,6 +3784,7 @@ private static bool IsUriSchemeRegistered(string scheme) private static string RemoveInvalidFileNameChars(string fileName) { + if (String.IsNullOrEmpty(fileName)) return "未知"; string invalidChars = new string(System.IO.Path.GetInvalidFileNameChars()); string regexPattern = $"[{Regex.Escape(invalidChars)}]"; return Regex.Replace(fileName, regexPattern, "_");