mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
fix: 去除路径左右的空格与控制字符 (#15082)
* fix: 去除路径左右的空格与控制字符 * fix: 忘了调库了 * fix: 忘了调库了
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user