mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix M_PathParts instead
(cherry picked from commit 244f0b228fefb69fb59c1f7f70d4815c0388a634)
This commit is contained in:
parent
f74adb0ad9
commit
21a3067936
2 changed files with 5 additions and 6 deletions
|
|
@ -2391,6 +2391,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;
|
||||
|
|
|
|||
|
|
@ -195,12 +195,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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue