diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-29 22:25:37 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-29 22:25:37 +0300 |
commit | cb4b5a8aa228116f03d76ace440115516cfb0ed5 (patch) | |
tree | d52c4321f28f9dbdabf6363e43d61112e552e82b /plugins/Dbx_mdbx/src/dbintf.cpp | |
parent | 586459d5ea483af365f7fc5293497bb188c71533 (diff) |
fixes #1802 (Dbx_Mdbx doesn't change profile timestamp on exit)
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbintf.cpp')
-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);
}
|