mirror of
https://github.com/ziglang/zig.git
synced 2026-11-22 04:37:39 -05:00
missing PATH_MAX change
This commit is contained in:
1 parent
4b68ef45af
commit
2f7f7d815d
1 file changed
+2
-3
+2
-3
@@ -638,10 +638,9 @@ pub async fn readFile(loop: *Loop, file_path: []const u8, max_size: usize) ![]u8
|
||||
var close_op = try CloseOperation.start(loop);
|
||||
defer close_op.finish();
|
||||
|
||||
const path_with_null = try std.cstr.addNullByte(loop.allocator, file_path);
|
||||
defer loop.allocator.free(path_with_null);
|
||||
const file_path_c = try os.toPosixPath(file_path);
|
||||
|
||||
const fd = try await (async openRead(loop, path_with_null[0..file_path.len]) catch unreachable);
|
||||
const fd = try await (async openRead(loop, file_path_c[0..file_path.len]) catch unreachable);
|
||||
close_op.setHandle(fd);
|
||||
|
||||
var list = std.ArrayList(u8).init(loop.allocator);
|
||||
|
||||
Reference in new issue
Block a user