4 ms·
[drive][:\][path][null] is 1+2+256+1 or 260.
by wvenable 5y ago
[drive][:\][path][null] is 1+2+256+1 or 260.
- contravariant 5y agoAh I see, and presumably path can't be empty so you just need a byte to denote the length?
- int_19h 5y agoIt's null-terminated, so there are no length bytes. You can have paths exceeding 260 chars for a long time now. The problem is that the older Win32 APIs that deal with files have structs with TCHAR[MAX_PATH] field in them, so changing that length would be a binary breaking change for apps. So the new APIs allow for longer paths, but code has to be specifically written to take advantage of them. Some languages and frameworks - e.g. Node.js and Python - had that support for a while; others are still catching up.
- Tempest1981 5y agoNotably, explorer.exe doesn't deal well with longer paths. But yeah, WSL may be the driving force.