check if Override Path points to folder or exe

This commit is contained in:
Float3
2022-05-08 23:12:08 +02:00
parent bb66928b2b
commit baa37262fe

View File

@@ -183,10 +183,11 @@ namespace VRCX
public void StartGameFromPath(string path, string arguments)
{
if (!path.EndsWith(".exe")) path = Path.Combine(path, "VRChat.exe");
Process.Start(new ProcessStartInfo
{
WorkingDirectory = path,
FileName = $"{path}\\VRChat.exe",
WorkingDirectory = Path.GetDirectoryName(path),
FileName = path,
UseShellExecute = false,
Arguments = arguments
}).Close();