diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-10-16 23:13:00 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-10-16 23:13:00 +0000 |
commit | 3a9d95bd011a8a5a39f0ad9aaaf682a926cfeccf (patch) | |
tree | 27145a61c0cfc1a32aac9c023257f352c68e8680 /lib | |
parent | f95f7bc1616c954043e3e5b06e2dac1f0530b5ad (diff) |
Delete existing entries to allow reuse of a BackupStoreDirectory object.
(refs #3)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backupclient/BackupStoreDirectory.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/backupclient/BackupStoreDirectory.cpp b/lib/backupclient/BackupStoreDirectory.cpp index 61e6461d..0d06da34 100644 --- a/lib/backupclient/BackupStoreDirectory.cpp +++ b/lib/backupclient/BackupStoreDirectory.cpp @@ -149,6 +149,11 @@ void BackupStoreDirectory::ReadFromStream(IOStream &rStream, int Timeout) 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! |