diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index 36d8901bdfe26bdcc41ef9381f38600127ab0471..a01de1f4fe9e13a57e6a5f828fcd4ad97bd4a925 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -485,7 +485,7 @@ static int32_t tsdbSetRepoEnv(char *rootDir, STsdbCfg *pCfg) { if (mkdir(dirName, 0755) < 0) { tsdbError("vgId:%d failed to create directory %s since %s", pCfg->tsdbId, dirName, strerror(errno)); - errno = TAOS_SYSTEM_ERROR(errno); + terrno = TAOS_SYSTEM_ERROR(errno); free(dirName); return -1; }