From 51bf7da8bd093e46fcc0e2b37c017dea0c1ebb86 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 31 Aug 2024 07:41:46 -0700 Subject: [PATCH] fix is_important .github/workflows for Windows --- aider/special.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aider/special.py b/aider/special.py index 303001adb..9d2e92e6e 100644 --- a/aider/special.py +++ b/aider/special.py @@ -179,13 +179,14 @@ ROOT_IMPORTANT_FILES = [ # Normalize the lists once NORMALIZED_ROOT_IMPORTANT_FILES = set(os.path.normpath(path) for path in ROOT_IMPORTANT_FILES) + def is_important(file_path): file_name = os.path.basename(file_path) - dir_name = os.path.dirname(file_path) + dir_name = os.path.normpath(os.path.dirname(file_path)) normalized_path = os.path.normpath(file_path) # Check for GitHub Actions workflow files - if dir_name == os.path.normpath(".github/workflows") and file_name.endswith(".yml"): + if dir_name == os.path.normpath(".github/workflows") and file_name.endswith(".yml"): return True return normalized_path in NORMALIZED_ROOT_IMPORTANT_FILES