summaryrefslogtreecommitdiffstats
path: root/plugins/contacts/symbian/contactsmodel/cntsrv/src/ccntstatemachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/contacts/symbian/contactsmodel/cntsrv/src/ccntstatemachine.cpp')
-rw-r--r--plugins/contacts/symbian/contactsmodel/cntsrv/src/ccntstatemachine.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/contacts/symbian/contactsmodel/cntsrv/src/ccntstatemachine.cpp b/plugins/contacts/symbian/contactsmodel/cntsrv/src/ccntstatemachine.cpp
index e520aa8a5b..85003c6408 100644
--- a/plugins/contacts/symbian/contactsmodel/cntsrv/src/ccntstatemachine.cpp
+++ b/plugins/contacts/symbian/contactsmodel/cntsrv/src/ccntstatemachine.cpp
@@ -766,8 +766,13 @@ TAccept CStateClosed::AcceptRequestL(CReqSetOwnCard* aRequest)
*/
TAccept CStateClosed::AcceptRequestL(CReqBackupRestoreBegin* aRequest)
{
- // Backup/restore can take place from this state without doing anything so
- // simply complete request.
+ // Backup/restore can take place from this state so close the files.
+ // First reset collection, since it construct views based on table
+ // Reset will fail if called after closing tables
+ iPersistenceLayer.FactoryL().GetCollectorL().Reset();
+ // Close the file to allow the backup/restore to take place.
+ iPersistenceLayer.ContactsFileL().Close();
+ iStateMachine.SetCurrentStateL(iStateMachine.StateBackupRestore());
aRequest->Complete();
return EProcessed;
}