ref: 4fa2835b96c0719cbde3455332390b51b0f7007f
parent: c33620540f35a1e64e0a60ee885520cfde9e8471
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Aug 28 15:46:48 EDT 2016
Fix mismatch between documentation and mkpath. Our docs didn't list the mode parameter. Our code did. The mode parameter is almost always better taken care of by umask, so..
--- a/lib/std/mkpath.myr
+++ b/lib/std/mkpath.myr
@@ -2,15 +2,15 @@
use "errno"
pkg std =
- const mkpath : (p : byte[:], mode : int64 -> errno)
+ const mkpath : (p : byte[:] -> errno)
;;
-const mkpath = {p, mode
+const mkpath = {p
var st
for var i = 0; i < p.len; i++
if p[i] == ('/' : byte) && i != 0
- st = mkdir(p[:i], mode)
+ st = mkdir(p[:i], 0o755)
if st != 0 && st != Eexist
-> st
;;