Add fexists check before mkdir.
More reliable on more systems than just mkdir.
@@ -10,12 +10,14 @@ const mkpath = {p
for var i = 0; i < p.len; i++
if p[i] == ('/' : byte) && i != 0
+ if !fexists(p[:i])
st = mkdir(p[:i], 0o755)
- if st != 0 && st != Eexist
+ if st != 0
-> st
;;
;;
;;
+ ;;
st = mkdir(p, 0o755)
-> Enone
