diff options
author | George Hazan <ghazan@miranda.im> | 2021-03-24 19:15:01 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-03-24 19:15:01 +0300 |
commit | 9575f7da8eee269334e1baece5ef11d48d4f8445 (patch) | |
tree | 71d490e7f80070bf3825f3ec2cfbaf5ceec06d12 | |
parent | 0874caae9d97e343a4b48742f52ba3dc7b1db497 (diff) |
.bak file to be removed before creation
-rw-r--r-- | src/mir_app/src/db_upgrade.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mir_app/src/db_upgrade.cpp b/src/mir_app/src/db_upgrade.cpp index f221bd20a9..9b6c83cfb5 100644 --- a/src/mir_app/src/db_upgrade.cpp +++ b/src/mir_app/src/db_upgrade.cpp @@ -45,6 +45,7 @@ MIR_APP_DLL(MDatabaseCommon*) DB::Upgrade(const wchar_t *profile) int errorCode; CMStringW wszBackupName(profile); wszBackupName.Append(L".bak"); + DeleteFileW(wszBackupName); if (!MoveFileW(profile, wszBackupName)) { DWORD dwError = GetLastError(); CMStringW wszError(FORMAT, TranslateT("Cannot move old profile '%s' to '%s': error %d"), profile, wszBackupName.c_str(), dwError); |