commit a68dc65327469b4b2cc8a034d5e28dac86fe2802 (tree)
parent 0bc80411f6a87a76edd0e3f04f697a0eab8ef9c0
Author: Andrew Kelley <superjoe30@gmail.com>
Date: Sat, 14 Oct 2017 15:39:31 -0400
fix os.makeDir for posix
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/std/os/index.zig b/std/os/index.zig
@@ -783,7 +783,7 @@ pub fn makeDirWindows(allocator: &Allocator, dir_path: []const u8) -> %void {
}
pub fn makeDirPosix(allocator: &Allocator, dir_path: []const u8) -> %void {
- const path_buf = cstr.addNullByte(allocator, dir_path);
+ const path_buf = %return cstr.addNullByte(allocator, dir_path);
defer allocator.free(path_buf);
const err = posix.getErrno(posix.mkdir(path_buf.ptr, 0o755));