Browse Source

os/os2: fix mkdir_all on posix with abs path

Laytan Laats 10 months ago
parent
commit
4b8462aa70
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/os/os2/path_posix.odin

+ 1 - 1
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]
 			}