diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-09 21:13:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-09 21:13:51 +0300 |
commit | 23e2a8a4e4ef1e72bce629b99bc686d0804fd085 (patch) | |
tree | 03f69be574b88695b92012b723dcef503bd7ff6d /plugins | |
parent | 89ac15679e32fa707757a95fafbfc7ef9b3e705d (diff) |
fixes #1257 (database migration process must not filter out 'duplicate' events)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Import/src/import.cpp | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 7e61b493fb..fe266db89d 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -965,24 +965,27 @@ static void ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int protoC nSkippedEvents++;
}
- if (!bSkipThis) {
- // check for duplicate entries
- if (!IsDuplicateEvent(hDst, dbei)) {
- // no need to display all these dialogs again
- if (dbei.eventType == EVENTTYPE_AUTHREQUEST || dbei.eventType == EVENTTYPE_ADDED)
- dbei.flags |= DBEF_READ;
-
- // add dbevent
- MCONTACT hOwner = (bIsMeta) ? MapContact(srcDb->GetEventContact(hEvent)) : hDst;
- if (hOwner != INVALID_CONTACT_ID) {
- // add dbevent
- if (dstDb->AddEvent(hOwner, &dbei) != NULL)
- nMessagesCount++;
- else
- AddMessage(LPGENW("Failed to add message"));
- }
- }
- else nDupes++;
+ if (bSkipThis)
+ continue;
+
+ // check for duplicate entries
+ if (nImportOptions != IOPT_COMPLETE && IsDuplicateEvent(hDst, dbei)) {
+ nDupes++;
+ continue;
+ }
+
+ // no need to display all these dialogs again
+ if (dbei.eventType == EVENTTYPE_AUTHREQUEST || dbei.eventType == EVENTTYPE_ADDED)
+ dbei.flags |= DBEF_READ;
+
+ // add dbevent
+ MCONTACT hOwner = (bIsMeta) ? MapContact(srcDb->GetEventContact(hEvent)) : hDst;
+ if (hOwner != INVALID_CONTACT_ID) {
+ // add dbevent
+ if (dstDb->AddEvent(hOwner, &dbei) != NULL)
+ nMessagesCount++;
+ else
+ AddMessage(LPGENW("Failed to add message"));
}
}
|