fix(detect): NFC-normalize the recomputed scan-root-relative path (#2468 follow-up)

The #2475 fix recomputed the match path against the explicit scan root but
skipped the _nfc() normalization rel_anchor gets, so an NFD-named path
could miss a parent ignore pattern under the #2544 NFC-matching regime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
safishamsi
2026-08-11 17:06:53 +01:00
co-authored by Claude Opus 4.8
parent 33d217c02f
commit 80ce81ef31
+1 -1
View File
@@ -1193,7 +1193,7 @@ def _is_ignored(
if not path_relative:
try:
if len(root.parts) > len(anchor.parts):
rel = str(target.relative_to(root)).replace(os.sep, "/")
rel = _nfc(str(target.relative_to(root)).replace(os.sep, "/"))
except ValueError:
pass
matched = _matches(rel, p, path_relative=path_relative)