Commit a68dc65327

Andrew Kelley <superjoe30@gmail.com>
2017-10-14 21:39:31
fix os.makeDir for posix
1 parent 0bc8041
Changed files (1)
std
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));