fix: 去除路径左右的空格与控制字符 (#15082)

* fix: 去除路径左右的空格与控制字符

* fix: 忘了调库了

* fix: 忘了调库了
This commit is contained in:
mayuri0v0
2025-12-18 13:20:00 +08:00
committed by GitHub
parent 46e2025699
commit e91efce7db

View File

@@ -15,6 +15,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using MaaWpfGui.Constants;
using MaaWpfGui.Helper;
@@ -232,11 +233,15 @@ public class GameSettingsUserControlModel : PropertyChangedBase
{
try
{
scriptPath = scriptPath.Trim();
if (string.IsNullOrWhiteSpace(scriptPath))
{
return false;
}
scriptPath = Regex.Replace(scriptPath, @"\p{C}", string.Empty);
string fileName;
string arguments;