mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Apparently this was a bad idea
This commit is contained in:
parent
dc4c9f0258
commit
006396bc92
@ -102,7 +102,7 @@ void CLog::CreateNewFile()
|
|||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
snprintf(name, sizeof(name), "%s%cL%02d%02d%03d.log", g_log_dir.c_str(), PATH_SEP_CHAR, curTime->tm_mon + 1, curTime->tm_mday, i);
|
snprintf(name, sizeof(name), "%s/L%02d%02d%03d.log", g_log_dir.c_str(), curTime->tm_mon + 1, curTime->tm_mday, i);
|
||||||
build_pathname_r(file, sizeof(file)-1, "%s", name);
|
build_pathname_r(file, sizeof(file)-1, "%s", name);
|
||||||
FILE *pTmpFile = fopen(file, "r"); // open for reading to check whether the file exists
|
FILE *pTmpFile = fopen(file, "r"); // open for reading to check whether the file exists
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ void CLog::LogError(const char *fmt, ...)
|
|||||||
va_end(arglst);
|
va_end(arglst);
|
||||||
|
|
||||||
FILE *pF = NULL;
|
FILE *pF = NULL;
|
||||||
snprintf(name, sizeof(name), "%s%cerror_%04d%02d%02d.log", g_log_dir.c_str(), PATH_SEP_CHAR, curTime->tm_year + 1900, curTime->tm_mon + 1, curTime->tm_mday);
|
snprintf(name, sizeof(name), "%s/error_%04d%02d%02d.log", g_log_dir.c_str(), curTime->tm_year + 1900, curTime->tm_mon + 1, curTime->tm_mday);
|
||||||
build_pathname_r(file, sizeof(file)-1, "%s", name);
|
build_pathname_r(file, sizeof(file)-1, "%s", name);
|
||||||
pF = fopen(file, "a+");
|
pF = fopen(file, "a+");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user