posix/os2: fix test and add back in removed temp guard

This commit is contained in:
Laytan Laats
2024-08-14 01:44:37 +02:00
parent de9abe1f7b
commit f00f68ef6f
2 changed files with 2 additions and 5 deletions
+2
View File
@@ -147,6 +147,8 @@ _cleanpath_from_handle_u16 :: proc(f: ^File) -> ([]u16, Error) {
return nil, _get_platform_error()
}
TEMP_ALLOCATOR_GUARD()
buf := make([]u16, max(n, 260)+1, temp_allocator())
n = win32.GetFinalPathNameByHandleW(h, raw_data(buf), u32(len(buf)), 0)
return _cleanpath_strip_prefix(buf[:n]), nil