From 4b8462aa701f500a351d583cc792d840311e6dbb Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Mon, 7 Oct 2024 22:11:16 +0200 Subject: [PATCH] os/os2: fix mkdir_all on posix with abs path --- core/os/os2/path_posix.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/os/os2/path_posix.odin b/core/os/os2/path_posix.odin index 6f358c58d..5ffdac28e 100644 --- a/core/os/os2/path_posix.odin +++ b/core/os/os2/path_posix.odin @@ -40,7 +40,7 @@ _mkdir_all :: proc(path: string, perm: int) -> Error { internal_mkdir_all :: proc(path: string, perm: int) -> Error { dir, file := filepath.split(path) - if file != path { + if file != path && dir != "/" { if len(dir) > 1 && dir[len(dir) - 1] == '/' { dir = dir[:len(dir) - 1] }