From 4097e37d9fdc8aa06499165d3252f1cd1033246d Mon Sep 17 00:00:00 2001 From: Spencer Brower Date: Fri, 19 Jun 2026 17:52:05 -0400 Subject: [PATCH] chore: Made some code more windows friendly. --- TODOS.md | 1 + cmd_list.odin | 5 ++++- crypto_test.odin | 3 ++- ssh_test.odin | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/TODOS.md b/TODOS.md index 8cf5c7c..dfec123 100644 --- a/TODOS.md +++ b/TODOS.md @@ -50,6 +50,7 @@ - [ ] cli.odin - [ ] cli_test.odin +- [x] colors.odin - [x] cmd_backup.odin - [x] cmd_check.odin - [ ] cmd_check_test.odin diff --git a/cmd_list.odin b/cmd_list.odin index f6c4e6f..d719ce9 100644 --- a/cmd_list.odin +++ b/cmd_list.odin @@ -31,7 +31,10 @@ cmd_list :: proc(cmd: ^Command) { table_rows := make([dynamic][]string, 0, len(rows), context.temp_allocator) for row in rows { - dir_str := strings.concatenate({row.Dir, "/"}, context.temp_allocator) + dir_str := strings.concatenate( + {row.Dir, os.Path_Separator_String}, + context.temp_allocator, + ) filename := filepath.base(row.Path) row_slice := make([]string, 2, context.temp_allocator) row_slice[0] = dir_str diff --git a/crypto_test.odin b/crypto_test.odin index 4f75c24..1423379 100644 --- a/crypto_test.odin +++ b/crypto_test.odin @@ -2,9 +2,10 @@ package main import "core:fmt" +import "core:os" import "core:testing" -CRYPTO_TEST_KEY_DIR :: "fixtures/keys" +CRYPTO_TEST_KEY_DIR :: "fixtures" + os.Path_Separator_String + "keys" make_test_key_pair :: proc(name: string) -> SshKeyPair { priv := fmt.tprintf("%s/%s", CRYPTO_TEST_KEY_DIR, name) diff --git a/ssh_test.odin b/ssh_test.odin index 73e641a..595826a 100644 --- a/ssh_test.odin +++ b/ssh_test.odin @@ -2,9 +2,10 @@ package main import "core:fmt" +import "core:os" import "core:testing" -TEST_KEY_DIR :: "fixtures/keys" +TEST_KEY_DIR :: "fixtures" + os.Path_Separator_String + "keys" @(test) test_parse_ed25519_public_key :: proc(t: ^testing.T) {