From 5532893ac91bb6cb9ce3dd3afdb15a45ec387436 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 30 Aug 2024 14:45:02 -0700 Subject: [PATCH] fix: improve important file matching in is_important function --- aider/special.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/special.py b/aider/special.py index 69f78a192..6a19e805c 100644 --- a/aider/special.py +++ b/aider/special.py @@ -231,7 +231,8 @@ def is_important(file_path): # Check if the file_path matches any of the NORMALIZED_IMPORTANT_FILES normalized_path = os.path.normpath(file_path) return any( - normalized_path.endswith(important_file) for important_file in NORMALIZED_IMPORTANT_FILES + normalized_path == important_file or normalized_path.endswith(os.sep + important_file) + for important_file in NORMALIZED_IMPORTANT_FILES )