fix: Fix config file detection in temp directories
- Change _walk_directory to check relative paths instead of absolute paths - Fixes issue where SKIP_DIRS containing 'tmp' was skipping all files under /tmp/ - This was causing test failures on Ubuntu (tests use tempfile.mkdtemp() which creates under /tmp) - Now only skips directories that are within the search directory, not in the absolute path Fixes test_config_extractor.py failures on Ubuntu Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -299,8 +299,13 @@ class ConfigFileDetector:
|
||||
if item.is_dir():
|
||||
continue
|
||||
|
||||
# Skip if in excluded directory
|
||||
if any(skip_dir in item.parts for skip_dir in self.SKIP_DIRS):
|
||||
# Skip if in excluded directory (check relative path only)
|
||||
try:
|
||||
relative_parts = item.relative_to(directory).parts
|
||||
if any(skip_dir in relative_parts for skip_dir in self.SKIP_DIRS):
|
||||
continue
|
||||
except ValueError:
|
||||
# Item is not relative to directory, skip it
|
||||
continue
|
||||
|
||||
yield item
|
||||
|
||||
Reference in New Issue
Block a user