diff options
Diffstat (limited to 'plugins/Dbx_mdbx/src')
-rw-r--r-- | plugins/Dbx_mdbx/src/dbintf.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp index 9c725297cd..40b899d1e2 100644 --- a/plugins/Dbx_mdbx/src/dbintf.cpp +++ b/plugins/Dbx_mdbx/src/dbintf.cpp @@ -64,8 +64,6 @@ CDbxMDBX::~CDbxMDBX() int CDbxMDBX::Load()
{
- TouchFile();
-
unsigned int defFlags = MDBX_CREATE;
{
txn_ptr trnlck(StartTran());
@@ -267,13 +265,13 @@ int CDbxMDBX::Map() void CDbxMDBX::TouchFile()
{
SYSTEMTIME st;
- ::GetLocalTime(&st);
+ ::GetSystemTime(&st);
FILETIME ft;
SystemTimeToFileTime(&st, &ft);
- HANDLE hFile = CreateFileW(m_tszProfileName, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
- if (hFile) {
+ HANDLE hFile = CreateFileW(m_tszProfileName, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
+ if (hFile != INVALID_HANDLE_VALUE) {
SetFileTime(hFile, nullptr, &ft, &ft);
CloseHandle(hFile);
}
|