Merge pull request #5652 from taosdata/fix/TD-3642
[TD-3642]<fix>: fix staging directory resource leak
This commit is contained in:
commit
76ed44f69c
|
@ -238,9 +238,11 @@ static int32_t dnodeInitStorage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
TDIR *tdir = tfsOpendir("vnode_bak/.staging");
|
TDIR *tdir = tfsOpendir("vnode_bak/.staging");
|
||||||
if (tfsReaddir(tdir) != NULL) {
|
bool stagingNotEmpty = tfsReaddir(tdir) != NULL;
|
||||||
dError("vnode_bak/.staging dir not empty, fix it first.");
|
|
||||||
tfsClosedir(tdir);
|
tfsClosedir(tdir);
|
||||||
|
|
||||||
|
if (stagingNotEmpty) {
|
||||||
|
dError("vnode_bak/.staging dir not empty, fix it first.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue