瀏覽代碼

Save rulebase only if credentials were specified on the command line.


git-svn-id: https://svn.microneil.com/svn/SNFUtility/trunk@9 aa37657e-1934-4a5f-aa6d-2d8eab27ff7c
master
adeniz 12 年之前
父節點
當前提交
fa2341d366
共有 2 個檔案被更改,包括 16 行新增11 行删除
  1. 10
    10
      Common/UtilityConfig.hpp
  2. 6
    1
      SNFMilterConfig/SNFMilterConfig.cpp

+ 10
- 10
Common/UtilityConfig.hpp 查看文件

@@ -181,6 +181,16 @@ public:
// owner.
void UpdateLogDir();
/// Determine whether the credentials should be updated.
//
// This method determines whether the credentials should be
// updated. If the user specified both the License ID and
// Authentication, then the credentials should be updated.
//
// \returns true if the credentials should be updated.
//
bool UpdateCredentialsSpecified();
/// Create or update the rulebase script.
//
// If the rulebase script doesn't exist, this method creates the
@@ -237,16 +247,6 @@ public:
private:
/// Determine whether the credentials should be updated.
//
// This method determines whether the credentials should be
// updated. If the user specified both the License ID and
// Authentication, then the credentials should be updated.
//
// \returns true if the credentials should be updated.
//
bool UpdateCredentialsSpecified();
/// Update the credentials of an existing rulebase script.
//
// This method does the actual work of updating the credentials of

+ 6
- 1
SNFMilterConfig/SNFMilterConfig.cpp 查看文件

@@ -219,7 +219,12 @@ SNFMilterConfig::SaveFileState() {
if (!Explain()) {
SaveFile.CreateBackupFile(GetRulebaseScriptName());
SaveFile.CreateBackupFile(GetRulebaseFileName());
if (UpdateCredentialsSpecified()) {
SaveFile.CreateBackupFile(GetRulebaseFileName());
}
SaveFile.CreateBackupFile(GetIdentityFileName());
SaveFile.CreateBackupFile(GetIgnoreListFileName());

Loading…
取消
儲存