X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/792492afbfdae75b239339d9511a19c906c8bd85..ff837095e9e509d3e03ace33fe1010eef35ebd02:/projects/stargazer/plugins/store/files/file_store.cpp diff --git a/projects/stargazer/plugins/store/files/file_store.cpp b/projects/stargazer/plugins/store/files/file_store.cpp index 6d8de6c2..890b2b6c 100644 --- a/projects/stargazer/plugins/store/files/file_store.cpp +++ b/projects/stargazer/plugins/store/files/file_store.cpp @@ -532,6 +532,7 @@ while ((entry = readdir(d))) errorStr += strerror(errno); errorStr += "'"; printfd(__FILE__, "FILES_STORE::RemoveDir() - unlink failed. Message: '%s'\n", strerror(errno)); + closedir(d); return -1; } } @@ -540,6 +541,7 @@ while ((entry = readdir(d))) { if (RemoveDir(str.c_str())) { + closedir(d); return -1; }