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

Fixed -workspace arg which includes BeefSpace.toml name

This commit is contained in:
Brian Fiete 2022-06-01 14:55:47 -07:00
parent 2576ae6bae
commit 1a164b166f

View file

@ -2897,12 +2897,16 @@ namespace IDE
} }
public void GetRelaunchCmd(bool safeMode, String outRelaunchCmd) public void GetRelaunchCmd(bool safeMode, String outRelaunchCmd)
{
if (mWorkspace.mDir != null)
{ {
outRelaunchCmd.Append("\""); outRelaunchCmd.Append("\"");
Environment.GetExecutableFilePath(outRelaunchCmd); Environment.GetExecutableFilePath(outRelaunchCmd);
outRelaunchCmd.Append("\" -workspace=\""); outRelaunchCmd.Append("\" -workspace=\"");
outRelaunchCmd.Append(mWorkspace.mDir); outRelaunchCmd.Append(mWorkspace.mDir);
outRelaunchCmd.Append("\""); outRelaunchCmd.Append("\"");
}
if (safeMode) if (safeMode)
outRelaunchCmd.Append(" -safe"); outRelaunchCmd.Append(" -safe");
} }
@ -7541,6 +7545,9 @@ namespace IDE
String fullDir = new String(); String fullDir = new String();
Path.GetFullPath(relDir, fullDir); Path.GetFullPath(relDir, fullDir);
if (fullDir.EndsWith("BeefSpace.toml", .OrdinalIgnoreCase))
fullDir.RemoveFromEnd("BeefSpace.toml".Length);
if ((File.Exists(fullDir)) || (IsBeefFile(fullDir))) if ((File.Exists(fullDir)) || (IsBeefFile(fullDir)))
{ {
mWorkspace.mCompositeFile = new CompositeFile(fullDir); mWorkspace.mCompositeFile = new CompositeFile(fullDir);