mdbx-tools: fix mdbx_chk to avoid creation of missing DB.

Change-Id: Ieaeee75c1c8f8b1e426817df86ef1769e691e504
This commit is contained in:
Leonid Yuriev 2019-11-15 11:16:26 +03:00
parent af6aa30c7c
commit 7703312b88

View File

@ -1021,7 +1021,7 @@ int main(int argc, char *argv[]) {
goto bailout;
}
rc = mdbx_env_open(env, envname, envflags, 0664);
rc = mdbx_env_open(env, envname, envflags, 0);
if ((envflags & MDBX_EXCLUSIVE) &&
(rc == MDBX_BUSY ||
#if defined(_WIN32) || defined(_WIN64)
@ -1031,7 +1031,7 @@ int main(int argc, char *argv[]) {
#endif
)) {
envflags &= ~MDBX_EXCLUSIVE;
rc = mdbx_env_open(env, envname, envflags | MDBX_ACCEDE, 0664);
rc = mdbx_env_open(env, envname, envflags | MDBX_ACCEDE, 0);
}
if (rc) {