summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-07-05 13:30:01 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-07-05 13:30:01 +0300
commit3f8d7daca60c27e3e23c3e1b54d44cd2c25a053b (patch)
tree5507b2fd535c0d0956e706f6dfa3675cda263e3e /plugins/Dbx_mdbx/src
parentb3526cc88c783619ec929b772d98582f9aa5a822 (diff)
forgotten check for non-local files
Diffstat (limited to 'plugins/Dbx_mdbx/src')
-rw-r--r--plugins/Dbx_mdbx/src/libmdbx/src/osal.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/Dbx_mdbx/src/libmdbx/src/osal.c b/plugins/Dbx_mdbx/src/libmdbx/src/osal.c
index c2fced0b4a..159fba965d 100644
--- a/plugins/Dbx_mdbx/src/libmdbx/src/osal.c
+++ b/plugins/Dbx_mdbx/src/libmdbx/src/osal.c
@@ -191,7 +191,7 @@ __cold void mdbx_panic(const char *fmt, ...) {
abort();
}
-/*----------------------------------------------------------------------------*/
+ /*----------------------------------------------------------------------------*/
#ifndef mdbx_asprintf
int mdbx_asprintf(char **strp, const char *fmt, ...) {
@@ -862,11 +862,13 @@ int mdbx_mmap(int flags, mdbx_mmap_t *map, size_t size, size_t limit) {
map->section = NULL;
map->address = nullptr;
- NTSTATUS rc = mdbx_check4nonlocal(map->fd, flags);
- if (rc != MDBX_SUCCESS)
- return rc;
+ if (!(flags & MDBX_EXCLUSIVE)) {
+ NTSTATUS rc = mdbx_check4nonlocal(map->fd, flags);
+ if (rc != MDBX_SUCCESS)
+ return rc;
+ }
- rc = mdbx_filesize(map->fd, &map->filesize);
+ NTSTATUS rc = mdbx_filesize(map->fd, &map->filesize);
if (rc != MDBX_SUCCESS)
return rc;
if ((flags & MDBX_RDONLY) == 0 && map->filesize != size) {