current codes not work as expedted
This commit is contained in:
parent
d9963d3eaa
commit
d06dc6ff6d
|
@ -287,17 +287,17 @@ static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum) {
|
||||||
tsLogObj.fileNum = maxFileNum;
|
tsLogObj.fileNum = maxFileNum;
|
||||||
taosGetLogFileName(fn);
|
taosGetLogFileName(fn);
|
||||||
|
|
||||||
|
|
||||||
if (strlen(fn) < LOG_FILE_NAME_LEN + 50 - 2) {
|
if (strlen(fn) < LOG_FILE_NAME_LEN + 50 - 2) {
|
||||||
strcpy(name, fn);
|
strcpy(name, fn);
|
||||||
strcat(name, ".0");
|
strcat(name, ".0");
|
||||||
}
|
}
|
||||||
|
bool log0Exist = stat(name, &logstat0) >= 0;
|
||||||
|
|
||||||
if (strlen(fn) < LOG_FILE_NAME_LEN + 50 - 2) {
|
if (strlen(fn) < LOG_FILE_NAME_LEN + 50 - 2) {
|
||||||
strcpy(name, fn);
|
strcpy(name, fn);
|
||||||
strcat(name, ".1");
|
strcat(name, ".1");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool log0Exist = stat(name, &logstat0) >= 0;
|
|
||||||
bool log1Exist = stat(name, &logstat1) >= 0;
|
bool log1Exist = stat(name, &logstat1) >= 0;
|
||||||
|
|
||||||
// if none of the log files exist, open 0, if both exists, open the old one
|
// if none of the log files exist, open 0, if both exists, open the old one
|
||||||
|
|
Loading…
Reference in New Issue