From 3b8d5b6f439eee0c78e69803fbd5f58646e8f1ff Mon Sep 17 00:00:00 2001 From: mlandolfi90 Date: Tue, 4 Aug 2026 14:41:24 -0400 Subject: [PATCH] fix(windows): stat paths through the long-path-aware converter cbm_path_info_utf8 converted with cbm_utf8_to_wide, the plain UTF-8 converter, while every other filesystem entry point in this file (cbm_opendir, cbm_fopen, cbm_rename_replace, cbm_canonical_path) uses cbm_path_to_wide, which canonicalises and applies the \?\ prefix past the legacy limit. The mismatch is observable: cbm_opendir enumerates a deep directory because it prefixes, then the per-entry stat fails because it does not. On a machine with LongPathsEnabled=0 that makes semantic_manifest_walk_controls abort the whole walk (CBM_NOT_FOUND) and semantic_manifest_hash_file silently drop files from the manifest, so the index degrades with no error. Co-Authored-By: Claude Opus 5 Signed-off-by: mlandolfi90 --- src/foundation/compat_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/foundation/compat_fs.c b/src/foundation/compat_fs.c index 746d46781..a6c4a3e2e 100644 --- a/src/foundation/compat_fs.c +++ b/src/foundation/compat_fs.c @@ -125,7 +125,7 @@ int cbm_path_info_utf8(const char *path, cbm_path_info_t *out) { if (!path || !out) { return CBM_NOT_FOUND; } - wchar_t *wpath = cbm_utf8_to_wide(path); + wchar_t *wpath = cbm_path_to_wide(path); if (!wpath) { return CBM_NOT_FOUND; }