diff --git a/analyzer/windows/modules/packages/archive.py b/analyzer/windows/modules/packages/archive.py index 57206b36b94..562a3511510 100644 --- a/analyzer/windows/modules/packages/archive.py +++ b/analyzer/windows/modules/packages/archive.py @@ -120,7 +120,7 @@ def start(self, path): for file in files: file_path = os.path.join(r, file) - if file_path == path or file_path in extracted_files: + if file_path in extracted_files: continue extracted_files.add(file_path) @@ -157,12 +157,12 @@ def start(self, path): # We have the file names according to 7ZIP output (file_names) # We have the file names that were actually extracted (files at root) # If these values are different, replace all - log.warning("Extracted archives:%s", extracted_archives) + log.debug("Extracted archives:%s", extracted_archives) files_at_root = [ - os.path.relpath(os.path.join(r, f), root) + os.path.relpath(p, root) for r, _, files in os.walk(root) for f in files - if os.path.join(r, f) != path and os.path.join(r, f) not in extracted_archives + if (p := os.path.join(r, f)) not in extracted_archives ] log.debug(files_at_root) file_names = files_at_root