1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-22 09:38:01 +02:00

Added safe mode

This commit is contained in:
Brian Fiete 2020-10-15 10:44:29 -07:00
parent 72242aa31c
commit 72411118c2
4 changed files with 80 additions and 6 deletions

View file

@ -39,6 +39,30 @@ namespace System.Diagnostics
outFileName.Append(mFileName);
}
public void SetFileNameAndArguments(StringView string)
{
if (string.StartsWith('"'))
{
int endPos = string.IndexOf('"', 1);
if (endPos != -1)
{
SetFileName(.(string, 1, endPos - 1));
SetArguments(.(string, endPos + 2));
return;
}
}
int spacePos = string.IndexOf(' ');
if (spacePos != -1)
{
SetFileName(.(string, 0, spacePos));
SetArguments(.(string, spacePos + 1));
return;
}
SetFileName(string);
}
public void SetFileName(StringView fileName)
{
mFileName.Set(fileName);