authorgravatar for shawn@git.icuShawn Landden <shawn@git.icu> 2018-08-23 16:59:03-07:00
committergravatar for shawn@git.icuShawn Landden <shawn@git.icu> 2018-08-23 17:00:50-07:00
log2f7f7d815d0c9c4e620c7a529837b5ef42d724f1
tree2f0bfb3e2d3f4068b59bb54eae5d6193e585fe44
parent4b68ef45af54abd7ba56878f93132ca608891cf1

missing PATH_MAX change


1 files changed, 2 insertions(+), 3 deletions(-)

std/event/fs.zig+2-3
...@@ -638,10 +638,9 @@ pub async fn readFile(loop: *Loop, file_path: []const u8, max_size: usize) ![]u8...@@ -638,10 +638,9 @@ pub async fn readFile(loop: *Loop, file_path: []const u8, max_size: usize) ![]u8
638 var close_op = try CloseOperation.start(loop);638 var close_op = try CloseOperation.start(loop);
639 defer close_op.finish();639 defer close_op.finish();
640640
641 const path_with_null = try std.cstr.addNullByte(loop.allocator, file_path);641 const file_path_c = try os.toPosixPath(file_path);
642 defer loop.allocator.free(path_with_null);
643642
644 const fd = try await (async openRead(loop, path_with_null[0..file_path.len]) catch unreachable);643 const fd = try await (async openRead(loop, file_path_c[0..file_path.len]) catch unreachable);
645 close_op.setHandle(fd);644 close_op.setHandle(fd);
646645
647 var list = std.ArrayList(u8).init(loop.allocator);646 var list = std.ArrayList(u8).init(loop.allocator);