未验证 提交 2a466260 编写于 作者: D dapan1121 提交者: GitHub

Merge pull request #9156 from taosdata/fix/TD-12238

<fix>[TD-12238] jump recursion if mkdir always failed
......@@ -265,7 +265,10 @@ int tfsMkdirRecurAt(const char *rname, int level, int id) {
if (errno == ENOENT) {
// Try to create upper
char *s = strdup(rname);
if (strcmp(s, ".") == 0){ // TD-12238, if mkdir failed, rname will be ".", it will be always failed, so need to jump recursion
free(s);
return -1;
}
// Make a copy of dirname(s) because the implementation of 'dirname' differs on different platforms.
// Some platform may modify the contents of the string passed into dirname(). Others may return a pointer to
// internal static storage space that will be overwritten by next call. For case like that, we should not use
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册