diff options
Diffstat (limited to 'lib/backupstore/BackupStoreAccounts.cpp')
-rw-r--r-- | lib/backupstore/BackupStoreAccounts.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/backupstore/BackupStoreAccounts.cpp b/lib/backupstore/BackupStoreAccounts.cpp index 5f51917b..d1c7430f 100644 --- a/lib/backupstore/BackupStoreAccounts.cpp +++ b/lib/backupstore/BackupStoreAccounts.cpp @@ -594,7 +594,8 @@ bool BackupStoreAccountsControl::OpenAccount(int32_t ID, std::string &rRootDirOu return true; } -int BackupStoreAccountsControl::CheckAccount(int32_t ID, bool FixErrors, bool Quiet) +int BackupStoreAccountsControl::CheckAccount(int32_t ID, bool FixErrors, bool Quiet, + bool ReturnNumErrorsFound) { std::string rootDir; int discSetNum; @@ -612,8 +613,15 @@ int BackupStoreAccountsControl::CheckAccount(int32_t ID, bool FixErrors, bool Qu // Check it BackupStoreCheck check(rootDir, discSetNum, ID, FixErrors, Quiet); check.Check(); - - return check.ErrorsFound()?1:0; + + if(ReturnNumErrorsFound) + { + return check.GetNumErrorsFound(); + } + else + { + return check.ErrorsFound() ? 1 : 0; + } } int BackupStoreAccountsControl::CreateAccount(int32_t ID, int32_t DiscNumber, |