mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
os2: fix wiping results with temp allocator guard
This commit is contained in:
@@ -48,8 +48,7 @@ _fstat_internal :: proc(fd: linux.Fd, allocator: runtime.Allocator) -> (fi: File
|
||||
|
||||
// NOTE: _stat and _lstat are using _fstat to avoid a race condition when populating fullpath
|
||||
_stat :: proc(name: string, allocator: runtime.Allocator) -> (fi: File_Info, err: Error) {
|
||||
assert(!is_temp(allocator))
|
||||
TEMP_ALLOCATOR_GUARD()
|
||||
TEMP_ALLOCATOR_GUARD(ignore=is_temp(allocator))
|
||||
name_cstr := temp_cstring(name) or_return
|
||||
|
||||
fd, errno := linux.open(name_cstr, {})
|
||||
@@ -61,8 +60,7 @@ _stat :: proc(name: string, allocator: runtime.Allocator) -> (fi: File_Info, err
|
||||
}
|
||||
|
||||
_lstat :: proc(name: string, allocator: runtime.Allocator) -> (fi: File_Info, err: Error) {
|
||||
assert(!is_temp(allocator))
|
||||
TEMP_ALLOCATOR_GUARD()
|
||||
TEMP_ALLOCATOR_GUARD(ignore=is_temp(allocator))
|
||||
name_cstr := temp_cstring(name) or_return
|
||||
|
||||
fd, errno := linux.open(name_cstr, {.PATH, .NOFOLLOW})
|
||||
|
||||
Reference in New Issue
Block a user