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:
parent
72242aa31c
commit
72411118c2
4 changed files with 80 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue