mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-07 11:04:17 +00:00
Fix CI
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package os
|
||||
|
||||
import "core:strconv"
|
||||
import "core:strings"
|
||||
import "core:mem"
|
||||
|
||||
@@ -53,8 +52,8 @@ read_dir :: proc(fd: Handle, n: int, allocator := context.allocator) -> (fi: []F
|
||||
|
||||
fi_, err = stat(fullpath);
|
||||
if err != ERROR_NONE {
|
||||
for fi_ in dfi {
|
||||
file_info_delete(fi_);
|
||||
for fi__ in dfi {
|
||||
file_info_delete(fi__);
|
||||
}
|
||||
delete(dfi);
|
||||
return;
|
||||
|
||||
@@ -5,9 +5,8 @@ foreign import libc "system:c"
|
||||
|
||||
import "core:runtime"
|
||||
import "core:strings"
|
||||
import "core:strconv"
|
||||
import "core:c"
|
||||
import "core:mem"
|
||||
import "core:strconv"
|
||||
|
||||
Handle :: distinct i32;
|
||||
File_Time :: distinct u64;
|
||||
@@ -492,7 +491,7 @@ _readlink :: inline proc(path: string) -> (string, Errno) {
|
||||
// NOTE(laleksic, 2021-01-21): Any cleaner way to resize the slice?
|
||||
bufsz *= 2;
|
||||
delete(buf);
|
||||
buf := make([]byte, bufsz);
|
||||
buf = make([]byte, bufsz);
|
||||
} else {
|
||||
return strings.string_from_ptr(&buf[0], rc), ERROR_NONE;
|
||||
}
|
||||
@@ -500,7 +499,7 @@ _readlink :: inline proc(path: string) -> (string, Errno) {
|
||||
}
|
||||
|
||||
absolute_path_from_handle :: proc(fd: Handle) -> (string, Errno) {
|
||||
buf: [256]byte;
|
||||
buf : [256]byte;
|
||||
fd_str := strconv.itoa( buf[:], cast(int)fd );
|
||||
|
||||
procfs_path := strings.concatenate( []string{ "/proc/self/fd/", fd_str } );
|
||||
@@ -510,8 +509,6 @@ absolute_path_from_handle :: proc(fd: Handle) -> (string, Errno) {
|
||||
}
|
||||
|
||||
absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) {
|
||||
ta := context.temp_allocator;
|
||||
|
||||
rel := rel;
|
||||
if rel == "" {
|
||||
rel = ".";
|
||||
|
||||
Reference in New Issue
Block a user