mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Create directories from -logfile too
(cherry picked from commit 98cb238d36e0f85d9d4b4d2cff59c720e1630bdd)
This commit is contained in:
parent
b4f93fea8e
commit
294dfbacc5
1 changed files with 4 additions and 6 deletions
|
|
@ -158,10 +158,6 @@ int main(int argc, char **argv)
|
||||||
if (fileabs)
|
if (fileabs)
|
||||||
{
|
{
|
||||||
strftime(logfile, sizeof logfile, format, timeinfo);
|
strftime(logfile, sizeof logfile, format, timeinfo);
|
||||||
|
|
||||||
M_MkdirEachUntil(logfile,
|
|
||||||
M_PathParts(logdir) - 1,
|
|
||||||
M_PathParts(logfile) - 1, 0755);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -190,11 +186,13 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
#endif/*LOGMESSAGES*/
|
#endif/*LOGMESSAGES*/
|
||||||
|
|
||||||
M_MkdirEach(logfile, M_PathParts(logdir) - 1, 0755);
|
|
||||||
|
|
||||||
strftime(&logfile[left], sizeof logfile - left, format, timeinfo);
|
strftime(&logfile[left], sizeof logfile - left, format, timeinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
M_MkdirEachUntil(logfile,
|
||||||
|
M_PathParts(logdir) - 1,
|
||||||
|
M_PathParts(logfile) - 1, 0755);
|
||||||
|
|
||||||
logstream = fopen(logfile, "wt");
|
logstream = fopen(logfile, "wt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue