You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
std.fs.Dir.Iterator cannot handle long file names on Windows #8268
bugObserved behavior contradicts documented or intended behavioros-windowsMicrosoft Windowsstandard libraryThis issue involves writing Zig code for the standard library.
What's the FileNameLength value for the failing directory entry?
I guess this is the usual problem with long path names introduced by Windows 10 and PATH_MAX being hardcoded to 260.
What's the FileNameLength value for the failing directory entry?
One entry has FileNameLength == 416, which required setting name_data: [1024]u8 to pass.
Creating a file with random long Japanese file name can reliably trigger this.
I guess this is partially due to CJK characters being encoded as three bytes in UTF-8?
bugObserved behavior contradicts documented or intended behavioros-windowsMicrosoft Windowsstandard libraryThis issue involves writing Zig code for the standard library.
Activity
LemonBoy commentedon Mar 16, 2021
What's the
FileNameLengthvalue for the failing directory entry?I guess this is the usual problem with long path names introduced by Windows 10 and
PATH_MAXbeing hardcoded to 260.jack1243star commentedon Mar 16, 2021
One entry has
FileNameLength == 416, which required settingname_data: [1024]u8to pass.Creating a file with random long Japanese file name can reliably trigger this.
I guess this is partially due to CJK characters being encoded as three bytes in UTF-8?
LemonBoy commentedon Mar 16, 2021
Oh, good catch. The longest UCS-2 codepoint is utf8-encoded as a sequence that's
43 bytes long so 260*43 is a good upper limit.Windows: Fix iterator name buffer size not handling all possible file…
Windows: Fix iterator name buffer size not handling all possible file…