From b97de6b588c6104b76990df5904756d3d0f91de7 Mon Sep 17 00:00:00 2001 From: DastInDark <2350416+hitenkoku@users.noreply.github.com> Date: Mon, 18 Jul 2022 21:55:04 +0900 Subject: [PATCH] revert file path display relative path #623 --- src/detections/detection.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/detections/detection.rs b/src/detections/detection.rs index 746d3dc2..706869cd 100644 --- a/src/detections/detection.rs +++ b/src/detections/detection.rs @@ -254,19 +254,13 @@ impl Detection { } else { None }; - let conf = configs::CONFIG.read().unwrap(); let abs_rule_path = &PathBuf::from(&rule.rulepath) .canonicalize() .unwrap() .display() .to_string()[4..]; - let file_opt_path = if conf.args.filepath.is_some() { - conf.args.filepath.as_ref().unwrap() - } else { - conf.args.directory.as_ref().unwrap() - }; let detect_info = DetectInfo { - filepath: get_output_str_path(file_opt_path, Path::new(&record_info.evtx_filepath)), + filepath: record_info.evtx_filepath.to_string(), rulepath: get_output_str_path( &configs::CONFIG.read().unwrap().args.rules, Path::new(abs_rule_path),