mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:44:12 +08:00
mdbx: env_open() consider zero mode_t as open-existing flag.
Change-Id: I6f9dbf2059822afaba4c3de8f4ce380613a7dc36
This commit is contained in:
parent
7617cce0c6
commit
01797cf1bc
@ -6489,8 +6489,10 @@ int __cold mdbx_env_open(MDBX_env *env, const char *path, unsigned flags,
|
||||
int oflags;
|
||||
if (F_ISSET(flags, MDBX_RDONLY))
|
||||
oflags = O_RDONLY;
|
||||
else
|
||||
else if (mode != 0)
|
||||
oflags = O_RDWR | O_CREAT;
|
||||
else
|
||||
oflags = O_RDWR;
|
||||
|
||||
rc = mdbx_openfile(dxb_pathname, oflags, mode, &env->me_fd,
|
||||
(env->me_flags & MDBX_EXCLUSIVE) ? true : false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user