Remove duplicate if branch

This commit is contained in:
Robert Müller 2024-01-25 19:21:54 +01:00
parent c4d512d86e
commit 725ebc929e

View file

@ -146,11 +146,7 @@ void CMenus::RenderStartMenu(CUIRect MainView)
char aBuf[IO_MAX_PATH_LENGTH];
Storage()->GetBinaryPath(PLAT_SERVER_EXEC, aBuf, sizeof(aBuf));
// No / in binary path means to search in $PATH, so it is expected that the file can't be opened. Just try executing anyway.
if(str_find(aBuf, "/") == 0)
{
m_ServerProcess.m_Process = shell_execute(aBuf);
}
else if(fs_is_file(aBuf))
if(str_find(aBuf, "/") == 0 || fs_is_file(aBuf))
{
m_ServerProcess.m_Process = shell_execute(aBuf);
}