Skip to content

[Windows] Long paths (>260 chars) never hashed by save_manifest/_md5_file — files re-flagged as changed on every update #1655

Description

@Ns2384-star

Version: graphifyy 0.9.5, Windows 11.

Problem

save_manifest / _md5_file use plain open(): files whose absolute path exceeds 260 chars are never hashed, so they are re-reported as changed on every update, forever (5 files on our corpus — deep, accented French folder names). cache._normalize_path already handles the \\?\ extended-length prefix for cache keys — but not for actual I/O.

Repro

Any file with an absolute path > 260 chars on a Windows box without the LongPathsEnabled registry opt-in: _md5_file fails/skips, the manifest entry never stabilizes, detect_incremental flags the file as changed on every run.

Proposal

On win32, prefix \\?\ before every open()/stat() in detect.py (hashing + word count), same normalization cache.py already does.

Related: #629 (closed — fixed the same class of problem for the semantic cache lookup).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions