diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/cenrepsrv/backup.cpp --- a/persistentstorage/centralrepository/cenrepsrv/backup.cpp Tue Aug 31 16:57:14 2010 +0300 +++ b/persistentstorage/centralrepository/cenrepsrv/backup.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -385,15 +385,6 @@ } -void CRepositoryBackupClient::RestoreRepositoryAndListL(TUid repositoryUid, CDirectFileStore* store, TStreamId settingsStreamId, TStreamId deletedSettingsStreamId, TInt& repIndex) - { - // Add the restored repository to the restored repositories list. - // Pass its changed-keys list to further restoring functions to add entries for post-restoration notification. - repIndex = AddRestoredRepositoryL(repositoryUid); - iRepository->RestoreRepositoryContentsL(*store, settingsStreamId, deletedSettingsStreamId, *iRestoredRepositoriesArray[repIndex]); - iRepository->CommitChangesL(); - } - // // CRepositoryBackupClient::RestoreCompleteL @@ -429,6 +420,7 @@ } + // Get the root stream and attempt to read a backup file header from it TStreamId rootStreamId = store->Root() ; RStoreReadStream rootStream ; @@ -470,8 +462,8 @@ // Iterate through index and attempt restore of each repository stream // we find in it. - restoreStreamIndex->Reset(); - TUid repositoryUid; + restoreStreamIndex->Reset() ; + TUid repositoryUid ; TStreamId settingsStreamId(KNullStreamIdValue); TStreamId deletedSettingsStreamId(KNullStreamIdValue); TStreamId installedSettingsStreamId(KNullStreamIdValue); @@ -480,10 +472,12 @@ { iRepository->OpenL(repositoryUid, *iNotifier, EFalse); iRepository->FailAllTransactions(); - TInt repIndex; - TRAPD(err, RestoreRepositoryAndListL(repositoryUid, store, settingsStreamId, deletedSettingsStreamId, repIndex)); + // Add the restored repository to the restored repositories list. + // Pass its changed-keys list to further restoring functions to add entries for post-restoration notification. + TInt repIndex = AddRestoredRepositoryL(repositoryUid); + iRepository->RestoreRepositoryContentsL(*store, settingsStreamId, deletedSettingsStreamId, *iRestoredRepositoriesArray[repIndex]); + iRepository->CommitChangesL(); iRepository->Close(); - User::LeaveIfError(err); // If the backup contains an installed repository containing default values for the settings, read them in if (installedSettingsStreamId != KNullStreamId) {