diff --git a/src/core.c b/src/core.c index 2fbf0bf2..65da0b2e 100644 --- a/src/core.c +++ b/src/core.c @@ -15321,7 +15321,10 @@ __cold int mdbx_env_deleteW(const wchar_t *pathname, err = MDBX_SUCCESS; } - if (err == MDBX_SUCCESS && !(dummy_env->me_flags & MDBX_NOSUBDIR)) { + if (err == MDBX_SUCCESS && !(dummy_env->me_flags & MDBX_NOSUBDIR) && + (/* pathname != "." */ pathname[0] != '.' || pathname[1] != 0) && + (/* pathname != ".." */ pathname[0] != '.' || pathname[1] != '.' || + pathname[2] != 0)) { err = osal_removedirectory(pathname); if (err == MDBX_SUCCESS) rc = MDBX_SUCCESS;