diff --git a/src/os/src/detail/osDir.c b/src/os/src/detail/osDir.c index 2f82d8866c839424f6652d0f181c5dc759dda279..7a537cdfead3a15e202b8d7d2bc5d40cff5281bc 100644 --- a/src/os/src/detail/osDir.c +++ b/src/os/src/detail/osDir.c @@ -56,6 +56,8 @@ void taosRename(char* oldName, char *newName) { return; } + // if newName in not empty, rename return fail. + // the newName must be empty or does not exist if (rename(oldName, newName)) { uError("%s is modify to %s fail, reason:%s", oldName, newName, strerror(errno)); } else {