Skip to content
Snippets Groups Projects
Commit 244f0b22 authored by Lactozilla's avatar Lactozilla :speech_balloon:
Browse files

Fix M_PathParts instead

parent 3bb7fd4c
No related branches found
No related tags found
2 merge requests!734Rebase Keycodes only branch.,!591Fix logfiles crashing Windoze (resolves #102)
......@@ -2457,6 +2457,8 @@ int M_PathParts(const char *path)
int n;
const char *p;
const char *t;
if (path == NULL)
return 0;
for (n = 0, p = path ;; ++n)
{
t = p;
......
......@@ -197,12 +197,9 @@ int main(int argc, char **argv)
format, timeinfo);
}
if (logdir)
{
M_MkdirEachUntil(logfilename,
M_PathParts(logdir) - 1,
M_PathParts(logfilename) - 1, 0755);
}
M_MkdirEachUntil(logfilename,
M_PathParts(logdir) - 1,
M_PathParts(logfilename) - 1, 0755);
#ifdef __unix__
logstream = fopen(logfilename, "w");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment