summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mir_app/src/db_upgrade.cpp1
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);