fix(windows): stat paths through the long-path-aware converter - #1445
fix(windows): stat paths through the long-path-aware converter#1445mlandolfi90 wants to merge 1 commit into
Conversation
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 <noreply@anthropic.com> Signed-off-by: mlandolfi90 <mlandolfi90@users.noreply.github.com>
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
|
On CI, since the acknowledgement asks for green or an explanation:
Two reasons I do not think the diff can explain it:
A re-run would settle it. Happy to be shown wrong if it reproduces.
🤖 Generated with Claude Code |
cbm_path_info_utf8converts withcbm_utf8_to_wide, the plain UTF-8 converter, while every other filesystem entry point in the same file —cbm_opendir,cbm_fopen,cbm_rename_replace,cbm_canonical_path— usescbm_path_to_wide, which canonicalises and applies the\\?\prefix past the legacy limit.The mismatch is observable within a single walk:
cbm_opendirsuccessfully enumerates a deep directory because it prefixes, then the per-entry stat fails because it does not.GetFileAttributesExWgets a bare path and returnsERROR_PATH_NOT_FOUND.Consequences, both in the semantic-manifest code:
semantic_manifest_walk_controls— one unstattable entry aborts the entire walk (CBM_NOT_FOUND).semantic_manifest_hash_file— returnsCBM_NOT_FOUND, so the file is silently dropped from the manifest.Either way the index degrades with no error surfaced. Machines with
LongPathsEnabled=0are the exposed case, and a mingw-cross PE carries nolongPathAwaremanifest, so flipping that registry policy is not a workaround there.One-word change, consistent with the convention the rest of the file already follows.
🤖 Generated with Claude Code