Browse Source

Fix linux

Lucas Perlind 3 months ago
parent
commit
1bea59ee68
2 changed files with 3 additions and 0 deletions
  1. 1 0
      core/os/os2/dir_linux.odin
  2. 2 0
      core/os/os2/path_linux.odin

+ 1 - 0
core/os/os2/dir_linux.odin

@@ -78,6 +78,7 @@ _read_directory_iterator :: proc(it: ^Read_Directory_Iterator) -> (fi: File_Info
 	it.impl.prev_fi = fi
 
 	if err != nil {
+		temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({}))
 		path, _ := _get_full_path(entry_fd, temp_allocator)
 		read_directory_iterator_set_error(it, path, err)
 	}

+ 2 - 0
core/os/os2/path_linux.odin

@@ -168,6 +168,8 @@ _get_working_directory :: proc(allocator: runtime.Allocator) -> (string, Error)
 }
 
 _set_working_directory :: proc(dir: string) -> Error {
+	temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({}))
+
 	dir_cstr := clone_to_cstring(dir, temp_allocator) or_return
 	return _get_platform_error(linux.chdir(dir_cstr))
 }