diff --git a/src/detections/utils.rs b/src/detections/utils.rs index f9d7071a..2f38de0a 100644 --- a/src/detections/utils.rs +++ b/src/detections/utils.rs @@ -396,7 +396,7 @@ pub fn check_setting_path(base_path: &Path, path: &str) -> PathBuf { /// 与えられたoption_pathが相対パスであるかを確認し、絶対パスであればそのまま絶対パスのまま文字列として返却を行い、 /// 相対パスであれば、カレントディレクトリとの相対パスの文字列から不要な(./、../)を除外した文字列を返却する関数 pub fn get_output_str_path(option_path: &Path, target_path: &Path) -> String { - if option_path.is_absolute() { + if option_path.is_absolute() && !OUTPUT_OMIT_REGEX.is_match(option_path.to_str().unwrap()) { target_path.to_str().unwrap().to_string() } else { let diff_path_result = diff_paths(target_path, &env::current_dir().unwrap());