From 26169c32ce05b1fcbf72d15de73d91a41a01d7ad Mon Sep 17 00:00:00 2001 From: Jaekwon Bang Date: Fri, 8 Nov 2024 18:49:31 +0900 Subject: [PATCH] Fix to exclude path --- src/fosslight_binary/binary_analysis.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fosslight_binary/binary_analysis.py b/src/fosslight_binary/binary_analysis.py index ad4825f..2e8ffe3 100755 --- a/src/fosslight_binary/binary_analysis.py +++ b/src/fosslight_binary/binary_analysis.py @@ -200,9 +200,8 @@ def find_binaries(path_to_find_bin, output_dir, formats, dburl="", simple_mode=F writing_msg = "" results = [] bin_list = [] - base_dir_name = os.path.basename(path_to_find_bin) scan_item = ScannerItem(PKG_NAME, "") - abs_path_to_exclude = [os.path.abspath(os.path.join(base_dir_name, path)) for path in path_to_exclude if path.strip() != ""] + abs_path_to_exclude = [os.path.abspath(path) for path in path_to_exclude if path.strip() != ""] if not os.path.isdir(path_to_find_bin): error_occured(error_msg=f"(-p option) Can't find the directory: {path_to_find_bin}",