mdbx: исправление ошибки открытия БД на ФС только-для-чтения.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2024-03-10 23:47:19 +03:00
parent a6f7d74a32
commit 471085788c
2 changed files with 13 additions and 13 deletions

View File

@@ -1836,8 +1836,8 @@ MDBX_INTERNAL_FUNC int osal_check_fs_rdonly(mdbx_filehandle_t handle,
#else
struct statvfs info;
if (err != MDBX_ENOFILE) {
if (statvfs(pathname, &info) == 0 && (info.f_flag & ST_RDONLY) == 0)
return err;
if (statvfs(pathname, &info) == 0)
return (info.f_flag & ST_RDONLY) ? MDBX_SUCCESS : err;
if (errno != MDBX_ENOFILE)
return errno;
}