mdbx: allow open DB on 9P/WSL2 filesystem in exclusive mode.

Related to https://github.com/erthink/libmdbx/issues/97
This commit is contained in:
Leonid Yuriev 2021-05-26 21:08:37 +03:00
parent 3e0c7758ef
commit a7167ce715

View File

@ -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;
}