diff --git a/core/os/os2/allocators.odin b/core/os/os2/allocators.odin index 1a02d4514..5481c4c61 100644 --- a/core/os/os2/allocators.odin +++ b/core/os/os2/allocators.odin @@ -52,7 +52,7 @@ TEMP_ALLOCATOR_GUARD :: #force_inline proc(collisions: []runtime.Allocator, loc Temp_Allocator :: struct { using arena: ^runtime.Arena, - using allocator: runtime.Allocator + using allocator: runtime.Allocator, } get_temp_allocator :: proc(tmp: runtime.Arena_Temp, _: runtime.Source_Code_Location) -> Temp_Allocator { diff --git a/core/os/os2/dir.odin b/core/os/os2/dir.odin index a20c1b346..7e0dfe97e 100644 --- a/core/os/os2/dir.odin +++ b/core/os/os2/dir.odin @@ -206,7 +206,7 @@ copy_directory :: proc(dst, src: string, dst_perm := 0o755) -> Error { file_infos := read_all_directory_by_path(src, temp_allocator) or_return for fi in file_infos { - temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({})) + temp_allocator_scope(temp_allocator) dst_path := join_path({dst, fi.name}, temp_allocator) or_return src_path := fi.fullpath diff --git a/core/os/os2/dir_windows.odin b/core/os/os2/dir_windows.odin index 722f49717..daabbaf67 100644 --- a/core/os/os2/dir_windows.odin +++ b/core/os/os2/dir_windows.odin @@ -51,8 +51,6 @@ Read_Directory_Iterator_Impl :: struct { @(require_results) _read_directory_iterator :: proc(it: ^Read_Directory_Iterator) -> (fi: File_Info, index: int, ok: bool) { - temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({})) - for !it.impl.no_more_files { err: Error file_info_delete(it.impl.prev_fi, file_allocator())