fix linux build failed
This commit is contained in:
parent
845493294d
commit
0176819461
|
@ -356,7 +356,7 @@ static int32_t taosLoadCfg(SConfig *pCfg, const char **envCmd, const char *input
|
||||||
taosExpandDir(inputCfgDir, cfgDir, PATH_MAX);
|
taosExpandDir(inputCfgDir, cfgDir, PATH_MAX);
|
||||||
char lastC = cfgDir[strlen(cfgDir) - 1];
|
char lastC = cfgDir[strlen(cfgDir) - 1];
|
||||||
char *tdDirsep = TD_DIRSEP;
|
char *tdDirsep = TD_DIRSEP;
|
||||||
if (lastC == '\\' || lastC == '\/') {
|
if (lastC == '\\' || lastC == '/') {
|
||||||
tdDirsep = "";
|
tdDirsep = "";
|
||||||
}
|
}
|
||||||
if (taosIsDir(cfgDir)) {
|
if (taosIsDir(cfgDir)) {
|
||||||
|
|
|
@ -154,7 +154,7 @@ int32_t taosInitSlowLog() {
|
||||||
|
|
||||||
if (strlen(tsLogDir) != 0) {
|
if (strlen(tsLogDir) != 0) {
|
||||||
char lastC = tsLogDir[strlen(tsLogDir) - 1];
|
char lastC = tsLogDir[strlen(tsLogDir) - 1];
|
||||||
if (lastC == '\\' || lastC == '\/') {
|
if (lastC == '\\' || lastC == '/') {
|
||||||
snprintf(fullName, PATH_MAX, "%s" "%s", tsLogDir, logFileName);
|
snprintf(fullName, PATH_MAX, "%s" "%s", tsLogDir, logFileName);
|
||||||
} else {
|
} else {
|
||||||
snprintf(fullName, PATH_MAX, "%s" TD_DIRSEP "%s", tsLogDir, logFileName);
|
snprintf(fullName, PATH_MAX, "%s" TD_DIRSEP "%s", tsLogDir, logFileName);
|
||||||
|
@ -183,7 +183,7 @@ int32_t taosInitLog(const char *logName, int32_t maxFiles) {
|
||||||
char fullName[PATH_MAX] = {0};
|
char fullName[PATH_MAX] = {0};
|
||||||
if (strlen(tsLogDir) != 0) {
|
if (strlen(tsLogDir) != 0) {
|
||||||
char lastC = tsLogDir[strlen(tsLogDir) - 1];
|
char lastC = tsLogDir[strlen(tsLogDir) - 1];
|
||||||
if (lastC == '\\' || lastC == '\/') {
|
if (lastC == '\\' || lastC == '/') {
|
||||||
snprintf(fullName, PATH_MAX, "%s" "%s", tsLogDir, logName);
|
snprintf(fullName, PATH_MAX, "%s" "%s", tsLogDir, logName);
|
||||||
} else {
|
} else {
|
||||||
snprintf(fullName, PATH_MAX, "%s" TD_DIRSEP "%s", tsLogDir, logName);
|
snprintf(fullName, PATH_MAX, "%s" TD_DIRSEP "%s", tsLogDir, logName);
|
||||||
|
|
Loading…
Reference in New Issue