Fix logfiles crashing Windoze

This commit is contained in:
Jaime Passos 2019-12-28 22:14:23 -03:00
parent f83d0fe3a1
commit 3bb7fd4cbf

View file

@ -197,9 +197,12 @@ int main(int argc, char **argv)
format, timeinfo); format, timeinfo);
} }
if (logdir)
{
M_MkdirEachUntil(logfilename, M_MkdirEachUntil(logfilename,
M_PathParts(logdir) - 1, M_PathParts(logdir) - 1,
M_PathParts(logfilename) - 1, 0755); M_PathParts(logfilename) - 1, 0755);
}
#ifdef __unix__ #ifdef __unix__
logstream = fopen(logfilename, "w"); logstream = fopen(logfilename, "w");