diff options
author | George Hazan <ghazan@miranda.im> | 2020-12-09 17:49:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-12-09 17:49:31 +0300 |
commit | f446bbf65b0a6ce49869263d3c99cb12b7fc158b (patch) | |
tree | 15f498068bf2ad3a24ca34987d3ae6e0b988fa25 | |
parent | 5f63ad8fb27e6d6751215f19422b836ae4605416 (diff) |
fixes #2641 (Не работает импорт базы данных)
-rw-r--r-- | plugins/Dbx_mdbx/src/dbintf.cpp | 5 | ||||
-rw-r--r-- | plugins/Import/import.vcxproj.filters | 36 |
2 files changed, 19 insertions, 22 deletions
diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp index 6dbd2454a4..dd0ed5cbaf 100644 --- a/plugins/Dbx_mdbx/src/dbintf.cpp +++ b/plugins/Dbx_mdbx/src/dbintf.cpp @@ -299,13 +299,10 @@ void CDbxMDBX::SetCacheSafetyMode(BOOL bIsSet) MDBX_txn* CDbxMDBX::StartTran()
{
- if (m_bReadOnly)
- return nullptr;
-
mir_cslock lck(m_csDbAccess);
if (m_pWriteTran == nullptr) {
- m_dbError = mdbx_txn_begin(m_env, nullptr, MDBX_TXN_READWRITE, &m_pWriteTran);
+ m_dbError = mdbx_txn_begin(m_env, nullptr, (m_bReadOnly) ? MDBX_TXN_RDONLY : MDBX_TXN_READWRITE, &m_pWriteTran);
// FIXME: throw an exception
_ASSERT(m_dbError == MDBX_SUCCESS);
}
diff --git a/plugins/Import/import.vcxproj.filters b/plugins/Import/import.vcxproj.filters index 9318adb14d..fa371c9906 100644 --- a/plugins/Import/import.vcxproj.filters +++ b/plugins/Import/import.vcxproj.filters @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
- <Filter Include="dbrw">
- <UniqueIdentifier>{0775b44c-fe4d-4330-9c89-2718336516b8}</UniqueIdentifier>
+ <Filter Include="Source Files\dbrw">
+ <UniqueIdentifier>{e176f3a4-8c75-4335-a753-570c376ad1ae}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@@ -40,31 +40,25 @@ <Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\dbrw\dbcontacts.cpp">
- <Filter>Source Files</Filter>
+ <Filter>Source Files\dbrw</Filter>
</ClCompile>
<ClCompile Include="src\dbrw\dbevents.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\dbrw\dbsettings.cpp">
- <Filter>Source Files</Filter>
+ <Filter>Source Files\dbrw</Filter>
</ClCompile>
<ClCompile Include="src\dbrw\dbintf.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\dbrw\dbsql.cpp">
- <Filter>Source Files</Filter>
+ <Filter>Source Files\dbrw</Filter>
</ClCompile>
<ClCompile Include="src\dbrw\dbrw.cpp">
- <Filter>Source Files</Filter>
+ <Filter>Source Files\dbrw</Filter>
+ </ClCompile>
+ <ClCompile Include="src\dbrw\dbsettings.cpp">
+ <Filter>Source Files\dbrw</Filter>
+ </ClCompile>
+ <ClCompile Include="src\dbrw\dbsql.cpp">
+ <Filter>Source Files\dbrw</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="src\dbrw\dbintf.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\dbrw\dbrw.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="src\resource.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -74,6 +68,12 @@ <ClInclude Include="src\version.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="src\dbrw\dbintf.h">
+ <Filter>Source Files\dbrw</Filter>
+ </ClInclude>
+ <ClInclude Include="src\dbrw\dbrw.h">
+ <Filter>Source Files\dbrw</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\resource.rc">
|