Use Storage for opening autoexec_server.log

This commit is contained in:
def 2020-09-05 23:30:49 +02:00
parent bb3509466a
commit 4ca4449ee4
2 changed files with 2 additions and 1 deletions

View file

@ -2072,7 +2072,7 @@ void CMenus::OnRender()
// TODO: Maybe call this less often, or probably even cleaner, use econ
if(!m_ServerProcess.Initialized)
{
IOHANDLE File = io_open("autoexec_server.log", IOFLAG_READ);
IOHANDLE File = Storage()->OpenFile("autoexec_server.log", IOFLAG_READ, IStorage::TYPE_ALL);
if(File)
{
m_ServerProcess.LineReader.Init(File);

View file

@ -53,6 +53,7 @@ void CMenus::RenderStartMenu(CUIRect MainView)
{
if(m_ServerProcess.Pid == -1)
{
Storage()->RemoveFile("autoexec_server.log", IStorage::TYPE_ALL);
m_ServerProcess.Pid = shell_execute(PLAT_SERVER_EXEC);
}
else