提交 5d1b09be 编写于 作者: wafwerar's avatar wafwerar

fix(os): file path format error

上级 f81f0978
......@@ -161,10 +161,12 @@ bool tfsIsSameFile(const STfsFile *pFile1, const STfsFile *pFile2) {
if (pFile1->did.level != pFile2->did.level) return false;
if (pFile1->did.id != pFile2->did.id) return false;
char nameBuf1[TMPNAME_LEN], nameBuf2[TMPNAME_LEN];
memset(nameBuf1, 0, TMPNAME_LEN);
memset(nameBuf2, 0, TMPNAME_LEN);
taosRealPath(pFile1->rname, nameBuf1, TMPNAME_LEN);
taosRealPath(pFile2->rname, nameBuf2, TMPNAME_LEN);
strncpy(nameBuf1, pFile1->rname, TMPNAME_LEN);
strncpy(nameBuf2, pFile2->rname, TMPNAME_LEN);
nameBuf1[TMPNAME_LEN - 1] = 0;
nameBuf2[TMPNAME_LEN - 1] = 0;
taosRealPath(nameBuf1, NULL, TMPNAME_LEN);
taosRealPath(nameBuf2, NULL, TMPNAME_LEN);
if (strncmp(nameBuf1, nameBuf2, TMPNAME_LEN) != 0) return false;
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册