From 653fe3198fbeef168b9d579da8d95ddf73dbb4c8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 19 May 2018 13:50:17 +0300 Subject: fixes #1368 (Hide dbx_mmap from profile manager) --- include/m_db_int.h | 1 + libs/win64/cmstub.lib | Bin 1824 -> 1824 bytes plugins/Dbx_mdbx/src/init.cpp | 2 +- src/mir_app/src/profilemanager.cpp | 3 ++- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/m_db_int.h b/include/m_db_int.h index d53fc6b2bd..f32439c213 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -191,6 +191,7 @@ public: #define EMKPRF_CREATEFAILED 1 // for some reason CreateFile() didnt like something #define MDB_CAPS_COMPACT 0x0001 // database can be compacted +#define MDB_CAPS_CREATE 0x0002 // new database can be created struct DATABASELINK { diff --git a/libs/win64/cmstub.lib b/libs/win64/cmstub.lib index 2ae32a03c3..219c2bd9a0 100644 Binary files a/libs/win64/cmstub.lib and b/libs/win64/cmstub.lib differ diff --git a/plugins/Dbx_mdbx/src/init.cpp b/plugins/Dbx_mdbx/src/init.cpp index a2c3243cd8..c45ff40a29 100644 --- a/plugins/Dbx_mdbx/src/init.cpp +++ b/plugins/Dbx_mdbx/src/init.cpp @@ -92,7 +92,7 @@ static MDatabaseCommon* loadDatabase(const TCHAR *profile, BOOL bReadOnly) static DATABASELINK dblink = { - MDB_CAPS_COMPACT, + MDB_CAPS_COMPACT | MDB_CAPS_CREATE, "dbx_mdbx", L"MDBX database driver", makeDatabase, diff --git a/src/mir_app/src/profilemanager.cpp b/src/mir_app/src/profilemanager.cpp index 47a0474052..f5b6e486d7 100644 --- a/src/mir_app/src/profilemanager.cpp +++ b/src/mir_app/src/profilemanager.cpp @@ -149,7 +149,8 @@ public: } else { for (auto &p : arDbPlugins) - m_driverList.AddString(TranslateW(p->szFullName), (LPARAM)p); + if (p->capabilities & MDB_CAPS_CREATE) + m_driverList.AddString(TranslateW(p->szFullName), (LPARAM)p); } // default item -- cgit v1.2.3