diff options
| author | Laytan <laytanlaats@hotmail.com> | 2024-09-03 19:31:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-03 19:31:04 +0200 |
| commit | 33735ba5cc02841479cf39f33a981620750211fc (patch) | |
| tree | 1e97f331864312bc2b573d8099b8d72ea9a02804 | |
| parent | 3da77bcd67d366b563ecf4064681bb4e2dd1d488 (diff) | |
| parent | 54b46247bd9ab2e90c583ed1367a0429140302df (diff) | |
Merge pull request #4180 from dvrd/alt
fix(os2): mkdir_all on path_posix
| -rw-r--r-- | core/os/os2/path_posix.odin | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/os/os2/path_posix.odin b/core/os/os2/path_posix.odin index 39ada264e..0b9a52532 100644 --- a/core/os/os2/path_posix.odin +++ b/core/os/os2/path_posix.odin @@ -39,12 +39,12 @@ _mkdir_all :: proc(path: string, perm: int) -> Error { return internal_mkdir_all(clean_path, perm) internal_mkdir_all :: proc(path: string, perm: int) -> Error { - a, _ := filepath.split(path) - if a != path { - if len(a) > 1 && a[len(a)-1] == '/' { - a = a[:len(a)-1] + dir, file := filepath.split(path) + if file != path { + if len(dir) > 1 && dir[len(dir) - 1] == '/' { + dir = dir[:len(dir) - 1] } - internal_mkdir_all(a, perm) or_return + internal_mkdir_all(dir, perm) or_return } err := _mkdir(path, perm) |