mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 22:34:12 +08:00
mdbx-tools: fix mdbx_chk to avoid creation of missing DB.
Change-Id: Ieaeee75c1c8f8b1e426817df86ef1769e691e504
This commit is contained in:
parent
af6aa30c7c
commit
7703312b88
@ -1021,7 +1021,7 @@ int main(int argc, char *argv[]) {
|
|||||||
goto bailout;
|
goto bailout;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = mdbx_env_open(env, envname, envflags, 0664);
|
rc = mdbx_env_open(env, envname, envflags, 0);
|
||||||
if ((envflags & MDBX_EXCLUSIVE) &&
|
if ((envflags & MDBX_EXCLUSIVE) &&
|
||||||
(rc == MDBX_BUSY ||
|
(rc == MDBX_BUSY ||
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
@ -1031,7 +1031,7 @@ int main(int argc, char *argv[]) {
|
|||||||
#endif
|
#endif
|
||||||
)) {
|
)) {
|
||||||
envflags &= ~MDBX_EXCLUSIVE;
|
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) {
|
if (rc) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user