summaryrefslogtreecommitdiff
path: root/libstd/mkpath.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-12-15 01:45:52 -0800
committerOri Bernstein <ori@eigenstate.org>2014-12-15 01:45:52 -0800
commit06424fdd8ecf8082dac5c109421919d0a3ce169a (patch)
treed40d0a3c8e1e72226fd43021d838b2f9c979aed6 /libstd/mkpath.myr
parent46bc8592a6cd4b2be507057f19bbb4e085e89bf2 (diff)
downloadmc-06424fdd8ecf8082dac5c109421919d0a3ce169a.tar.gz
Put the if in the right place.
mkpath() should work now.
Diffstat (limited to 'libstd/mkpath.myr')
-rw-r--r--libstd/mkpath.myr5
1 files changed, 3 insertions, 2 deletions
diff --git a/libstd/mkpath.myr b/libstd/mkpath.myr
index 2da5333..b7e8e24 100644
--- a/libstd/mkpath.myr
+++ b/libstd/mkpath.myr
@@ -12,8 +12,9 @@ const mkpath = {p
for i = 0; i < p.len; i++
if p[i] == '/' castto(byte) && i != 0
st = mkdir(p[:i], 0o777)
- elif st != 0 && (st castto(errno)) != Eexist
- -> false
+ if st != 0 && (st castto(errno)) != Eexist
+ -> false
+ ;;
;;
;;