From 9144f85820dcb471d97d44c3a6e979ab94bf549d Mon Sep 17 00:00:00 2001 From: datechnoman Date: Tue, 20 Feb 2024 11:09:11 +0000 Subject: [PATCH] Bug fix for files not comparing correctly --- commoncrawl_wat_path_comparer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commoncrawl_wat_path_comparer.py b/commoncrawl_wat_path_comparer.py index 18ea40b..81083fc 100644 --- a/commoncrawl_wat_path_comparer.py +++ b/commoncrawl_wat_path_comparer.py @@ -35,8 +35,8 @@ def main(): # Read paths from the wat.paths file paths = read_paths_from_file(wat_paths_file_path) - # Filter out paths that partially match directory lines - filtered_paths = [path for path in paths if not any(directory_line in path for directory_line in directory_files)] + # Filter out paths that exactly match directory lines + filtered_paths = [path for path in paths if os.path.basename(path) not in directory_files] # Write the list of modified files to a text file output_file_path = 'missing_wat_files.txt'