Sfoglia il codice sorgente

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 anni fa
parent
commit
fa2341d366
2 ha cambiato i file con 16 aggiunte e 11 eliminazioni
  1. 10
    10
      Common/UtilityConfig.hpp
  2. 6
    1
      SNFMilterConfig/SNFMilterConfig.cpp

+ 10
- 10
Common/UtilityConfig.hpp Vedi File

@@ -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 Vedi File

@@ -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…
Annulla
Salva