diff options
author | George Hazan <ghazan@miranda.im> | 2021-01-31 22:35:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-01-31 22:35:54 +0300 |
commit | 36d0c8d1d781d80e4bee71208d72ea5a1f8e1fec (patch) | |
tree | 30aa8f85dda26de517982e3b5c3e6c6d3d18056a /plugins/Import/src | |
parent | c6b493f65d7d768782852b6379c663161b63695f (diff) |
we import slower, but more securely (flush database time to time)
Diffstat (limited to 'plugins/Import/src')
-rw-r--r-- | plugins/Import/src/import.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 68b927a66f..183152c98f 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -548,7 +548,6 @@ int CImportBatch::ImportGroups() Clist_GroupSetExpanded(group_id, (it->wszName[0] & GROUPF_EXPANDED));
}
-
return arGroups.getCount();
}
@@ -1051,6 +1050,7 @@ void CImportBatch::DoImport() AddMessage(L"");
}
+ dstDb->Flush();
// End of Import Groups
// Import Contacts
@@ -1081,6 +1081,7 @@ void CImportBatch::DoImport() }
else AddMessage(LPGENW("Skipping new contacts import."));
AddMessage(L"");
+ dstDb->Flush();
// End of Import Contacts
// Import NULL contact message chain
@@ -1096,6 +1097,7 @@ void CImportBatch::DoImport() }
else AddMessage(LPGENW("Skipping system history import."));
AddMessage(L"");
+ dstDb->Flush();
// Import other contact messages
if (m_iOptions & IOPT_HISTORY) {
@@ -1103,6 +1105,7 @@ void CImportBatch::DoImport() MCONTACT hContact = srcDb->FindFirstContact();
for (int i = 1; hContact != NULL; i++) {
ImportHistory(hContact, nullptr, NULL);
+ dstDb->Flush();
SetProgress(100 * i / nNumberOfContacts);
hContact = srcDb->FindNextContact(hContact);
@@ -1110,6 +1113,7 @@ void CImportBatch::DoImport() }
else AddMessage(LPGENW("Skipping history import."));
AddMessage(L"");
+ dstDb->Flush();
// Restore database writing mode
dstDb->SetCacheSafetyMode(TRUE);
|