mirror of
https://github.com/isar/libmdbx.git
synced 2025-02-08 12:00:50 +08:00
mdbx: accept MDBX_EACCESS and MDBX_EPERM for without-LCK read-only mode.
Change-Id: I024243184c06ddf86bcc62d6e4b1b951d21789d5
This commit is contained in:
parent
6fc3b89f79
commit
4ea1d2f8d2
@ -6666,7 +6666,8 @@ static int __cold mdbx_setup_lck(MDBX_env *env, char *lck_pathname,
|
|||||||
(env->me_flags & MDBX_EXCLUSIVE) ? true : false);
|
(env->me_flags & MDBX_EXCLUSIVE) ? true : false);
|
||||||
if (err != MDBX_SUCCESS) {
|
if (err != MDBX_SUCCESS) {
|
||||||
if (!(err == MDBX_ENOFILE && (env->me_flags & MDBX_EXCLUSIVE)) &&
|
if (!(err == MDBX_ENOFILE && (env->me_flags & MDBX_EXCLUSIVE)) &&
|
||||||
!(err == MDBX_EROFS && (env->me_flags & MDBX_RDONLY)))
|
!((err == MDBX_EROFS || err == MDBX_EACCESS || err == MDBX_EPERM) &&
|
||||||
|
(env->me_flags & MDBX_RDONLY)))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
/* LY: without-lck mode (e.g. exclusive or on read-only filesystem) */
|
/* LY: without-lck mode (e.g. exclusive or on read-only filesystem) */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user