[Box Backup-commit] COMMIT r1081 - box/chris/merge/lib/backupclient

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Tue Oct 17 00:13:00 BST 2006


Author: chris
Date: 2006-10-17 00:13:00 +0100 (Tue, 17 Oct 2006)
New Revision: 1081

Modified:
   box/chris/merge/lib/backupclient/BackupStoreDirectory.cpp
Log:
Delete existing entries to allow reuse of a BackupStoreDirectory object.
(refs #3)


Modified: box/chris/merge/lib/backupclient/BackupStoreDirectory.cpp
===================================================================
--- box/chris/merge/lib/backupclient/BackupStoreDirectory.cpp	2006-10-16 23:12:24 UTC (rev 1080)
+++ box/chris/merge/lib/backupclient/BackupStoreDirectory.cpp	2006-10-16 23:13:00 UTC (rev 1081)
@@ -149,6 +149,11 @@
 	int count = ntohl(hdr.mNumEntries);
 	
 	// Clear existing list
+	for(std::vector<Entry*>::iterator i = mEntries.begin(); 
+		i != mEntries.end(); i++)
+	{
+		delete (*i);
+	}
 	mEntries.clear();
 	
 	// Read them in!




More information about the Boxbackup-commit mailing list