From a7167ce7154d394201037afdded8678c17ca1b64 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Wed, 26 May 2021 21:08:37 +0300 Subject: [PATCH] mdbx: allow open DB on 9P/WSL2 filesystem in exclusive mode. Related to https://github.com/erthink/libmdbx/issues/97 --- src/osal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osal.c b/src/osal.c index 81cd53af..79d9ffa4 100644 --- a/src/osal.c +++ b/src/osal.c @@ -1329,13 +1329,13 @@ static int mdbx_check_fs_local(mdbx_filehandle_t handle, int flags) { strncasecmp("cifs", name, name_len) == 0 || strncasecmp("ncpfs", name, name_len) == 0 || strncasecmp("smbfs", name, name_len) == 0 || + strcasecmp("9P" /* WSL2 */, name) == 0 || ((name_len > 3 && strncasecmp("fuse", name, 4) == 0) && strncasecmp("fuseblk", name, name_len) != 0)) && !(flags & MDBX_EXCLUSIVE)) return MDBX_EREMOTE; if (strcasecmp("ftp", name) == 0 || strcasecmp("http", name) == 0 || - strcasecmp("sshfs", name) == 0 || - strcasecmp("9P" /* WSL2 */, name) == 0) + strcasecmp("sshfs", name) == 0) return MDBX_EREMOTE; }