os/os2: fix mkdir_all on posix with abs path
This commit is contained in:
1 parent
c50eaa0b77
commit
4b8462aa70
1 file changed
+1
-1
@@ -40,7 +40,7 @@ _mkdir_all :: proc(path: string, perm: int) -> Error {
|
|||||||
|
|
||||||
internal_mkdir_all :: proc(path: string, perm: int) -> Error {
|
internal_mkdir_all :: proc(path: string, perm: int) -> Error {
|
||||||
dir, file := filepath.split(path)
|
dir, file := filepath.split(path)
|
||||||
if file != path {
|
if file != path && dir != "/" {
|
||||||
if len(dir) > 1 && dir[len(dir) - 1] == '/' {
|
if len(dir) > 1 && dir[len(dir) - 1] == '/' {
|
||||||
dir = dir[:len(dir) - 1]
|
dir = dir[:len(dir) - 1]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user