mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 02:42:49 +00:00
Create directories from -logfile too
This commit is contained in:
parent
5fbe77cdda
commit
98cb238d36
1 changed files with 4 additions and 6 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue