Selaa lähdekoodia

Remove "//" from rulebase download status file.

master
Alban Deniz 6 vuotta sitten
vanhempi
commit
4b4f566081
1 muutettua tiedostoa jossa 10 lisäystä ja 3 poistoa
  1. 10
    3
      Common/UtilityConfig.cpp

+ 10
- 3
Common/UtilityConfig.cpp Näytä tiedosto

@@ -57,7 +57,7 @@ const std::string ScriptNameKey("SCRIPT"); ///< Text to replace with script name
const std::string SnifferPathKey("SNIFFER_PATH"); ///< Text to replace with directory of the rulebase.
// SNIFFER_PATH is replaced with the path of the rulebase.
const std::string UtilityConfig::RulebaseDownloadStatusFile("SNIFFER_PATH/getRulebase.status");
const std::string UtilityConfig::RulebaseDownloadStatusFile("SNIFFER_PATHgetRulebase.status");
#ifdef DEFAULT_DATA_DIR
// *nix, DEFAULT_DATA_DIR is specified on the compile command line.
@@ -251,8 +251,15 @@ UtilityConfig::GetWorkspacePath(void) {
string
UtilityConfig::GetRulebasePath(void) {
return CFGData.paths_rulebase_path;
if (CFGData.paths_rulebase_path.empty())
return "";
// Ensure that there's a trailing "/".
if (CFGData.paths_rulebase_path[CFGData.paths_rulebase_path.length() - 1] ==
'/')
return CFGData.paths_rulebase_path;
return CFGData.paths_rulebase_path + "/";
}
string
@@ -1132,7 +1139,7 @@ UtilityConfig::DownloadRulebase() {
if (!Input) {
string Temp;
Temp = "Error opening rulebase download scriptstatus file " + StatusFile;
Temp = "Error opening rulebase download script status file " + StatusFile;
Temp += ": ";
Temp += strerror(errno);
throw std::runtime_error(Temp);

Loading…
Peruuta
Tallenna