Skip to content
Snippets Groups Projects
Commit 98cb238d authored by James R.'s avatar James R.
Browse files

Create directories from -logfile too

parent 5fbe77cd
No related branches found
No related tags found
2 merge requests!734Rebase Keycodes only branch.,!567haha log files
......@@ -158,10 +158,6 @@ int main(int argc, char **argv)
if (fileabs)
{
strftime(logfile, sizeof logfile, format, timeinfo);
M_MkdirEachUntil(logfile,
M_PathParts(logdir) - 1,
M_PathParts(logfile) - 1, 0755);
}
else
{
......@@ -190,11 +186,13 @@ int main(int argc, char **argv)
}
#endif/*LOGMESSAGES*/
M_MkdirEach(logfile, M_PathParts(logdir) - 1, 0755);
strftime(&logfile[left], sizeof logfile - left, format, timeinfo);
}
M_MkdirEachUntil(logfile,
M_PathParts(logdir) - 1,
M_PathParts(logfile) - 1, 0755);
logstream = fopen(logfile, "wt");
}
......
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