mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
[os2] Add missing temp_file implementation for Linux
This commit is contained in:
@@ -3,8 +3,11 @@ package os2
|
|||||||
|
|
||||||
import "base:runtime"
|
import "base:runtime"
|
||||||
|
|
||||||
|
_temp_dir :: proc(allocator: runtime.Allocator) -> (string, runtime.Allocator_Error) {
|
||||||
_temp_dir :: proc(allocator: runtime.Allocator) -> (string, Error) {
|
TEMP_ALLOCATOR_GUARD()
|
||||||
//TODO
|
tmpdir := get_env("TMPDIR", temp_allocator())
|
||||||
return "", nil
|
if tmpdir == "" {
|
||||||
|
tmpdir = "/tmp"
|
||||||
|
}
|
||||||
|
return clone_string(tmpdir, allocator)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user