From 9b60e6be3c41466e2beae22ef4cfd6f776f27b0f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Jun 2018 17:56:58 +0300 Subject: FILE_SHARE_READ still must be set even in the exclusive mode --- plugins/Dbx_mdbx/src/libmdbx/src/osal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/Dbx_mdbx/src/libmdbx/src/osal.c b/plugins/Dbx_mdbx/src/libmdbx/src/osal.c index 1a57d750b3..33c755af99 100644 --- a/plugins/Dbx_mdbx/src/libmdbx/src/osal.c +++ b/plugins/Dbx_mdbx/src/libmdbx/src/osal.c @@ -431,7 +431,8 @@ int mdbx_openfile(const char *pathname, int flags, mode_t mode, break; case O_RDWR: DesiredAccess = GENERIC_READ | GENERIC_WRITE; - ShareMode = exclusive ? 0 : (FILE_SHARE_READ | FILE_SHARE_WRITE); + ShareMode = + exclusive ? FILE_SHARE_READ : (FILE_SHARE_READ | FILE_SHARE_WRITE); break; } -- cgit v1.2.3