mirror of
https://gitflic.ru/project/erthink/libmdbx.git
synced 2025-01-30 11:55:56 +00:00
mdbx: устранение MDBX_EINVAL
в случае mdbx_env_remove(".")
.
This commit is contained in:
parent
5c3c7b9292
commit
2ce6ed33fa
@ -15321,7 +15321,10 @@ __cold int mdbx_env_deleteW(const wchar_t *pathname,
|
|||||||
err = MDBX_SUCCESS;
|
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);
|
err = osal_removedirectory(pathname);
|
||||||
if (err == MDBX_SUCCESS)
|
if (err == MDBX_SUCCESS)
|
||||||
rc = MDBX_SUCCESS;
|
rc = MDBX_SUCCESS;
|
||||||
|
Loading…
Reference in New Issue
Block a user