ソースを参照

Remove "//" from rulebase download status file.

master
Alban Deniz 6年前
コミット
4b4f566081
1個のファイルの変更10行の追加3行の削除
  1. 10
    3
      Common/UtilityConfig.cpp

+ 10
- 3
Common/UtilityConfig.cpp ファイルの表示

@@ -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);

読み込み中…
キャンセル
保存