diff options
author | Chris Wilson <chris+github@qwirx.com> | 2012-11-08 00:35:06 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2012-11-08 00:35:06 +0000 |
commit | b10668519f0f17e40ce71ade4a34f83c0329978d (patch) | |
tree | 25e8a4e4ee9b5a34eb52d591e2f000003cf2a68d /lib/backupstore/BackupStoreCheck2.cpp | |
parent | 2dc7475929672f56a73f0e292e55678dd47986b2 (diff) |
Make CreateForRegeneration save the AccountEnabled flag and any extra data
copied from the original info file.
Diffstat (limited to 'lib/backupstore/BackupStoreCheck2.cpp')
-rw-r--r-- | lib/backupstore/BackupStoreCheck2.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/backupstore/BackupStoreCheck2.cpp b/lib/backupstore/BackupStoreCheck2.cpp index ae5179ed..72ac9480 100644 --- a/lib/backupstore/BackupStoreCheck2.cpp +++ b/lib/backupstore/BackupStoreCheck2.cpp @@ -646,6 +646,15 @@ void BackupStoreCheck::WriteNewStoreInfo() } // Build a new store info + std::auto_ptr<MemBlockStream> extra_data; + if(pOldInfo.get()) + { + extra_data.reset(new MemBlockStream(pOldInfo->GetExtraData())); + } + else + { + extra_data.reset(new MemBlockStream(/* empty */)); + } std::auto_ptr<BackupStoreInfo> info(BackupStoreInfo::CreateForRegeneration( mAccountID, mAccountName, @@ -658,7 +667,9 @@ void BackupStoreCheck::WriteNewStoreInfo() mBlocksInDeletedFiles, mBlocksInDirectories, softLimit, - hardLimit)); + hardLimit, + (pOldInfo.get() ? pOldInfo->IsAccountEnabled() : true), + *extra_data)); info->AdjustNumFiles(mNumFiles); info->AdjustNumOldFiles(mNumOldFiles); info->AdjustNumDeletedFiles(mNumDeletedFiles); |