General clean up of os2.read_directory for Windows

This commit is contained in:
gingerBill
2024-07-24 21:45:35 +01:00
parent 2dbccbde54
commit f03c2b7783
5 changed files with 42 additions and 19 deletions
+2 -1
View File
@@ -67,8 +67,9 @@ internal_stat :: proc(name: string, create_file_attributes: u32, allocator: runt
if len(name) == 0 {
return {}, .Not_Exist
}
TEMP_ALLOCATOR_GUARD()
wname := _fix_long_path(name) or_return
wname := _fix_long_path(name, temp_allocator()) or_return
fa: win32.WIN32_FILE_ATTRIBUTE_DATA
ok := win32.GetFileAttributesExW(wname, win32.GetFileExInfoStandard, &fa)
if ok && fa.dwFileAttributes & win32.FILE_ATTRIBUTE_REPARSE_POINT == 0 {