- file_set added, deleted, common;
- partition_sets( current, backed_up, added, common, deleted );
-
- { // This little block will copy the last_backup_date from the second set to the first
- FileDataNameCmp cmp;
-
- file_set common_with_dates;
- set_union( backed_up.begin(), backed_up.end(),
- current.begin(), current.end(),
- inserter( common_with_dates, common_with_dates.begin() ),
- cmp );
-
- file_set::iterator i = common.begin(), j = common_with_dates.begin();
- for( ; i != common.end(); ++i, ++j ) {
- (*i)->setLastBackupDate( (*j)->getLastBackupDate() );
- }
- }
+ file_set added, deleted, common, old_common;
+ partition_sets( current, backed_up, added, common, old_common, deleted );