Skip to content

Commit c5b4e01

Browse files
committed
io.readFileAlloc -> fs.cwd().readFileAlloc
1 parent 1e92b1b commit c5b4e01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src-self-hosted/stage2.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ fn fmtPath(fmt: *Fmt, file_path: []const u8, check_mode: bool) FmtError!void {
324324
if (fmt.seen.exists(real_path)) return;
325325
try fmt.seen.put(real_path);
326326

327-
const source_code = io.readFileAlloc(fmt.allocator, real_path) catch |err| switch (err) {
327+
const source_code = fs.cwd().readFileAlloc(fmt.allocator, real_path, self_hosted_main.max_src_size) catch |err| switch (err) {
328328
error.IsDir, error.AccessDenied => {
329329
// TODO make event based (and dir.next())
330330
var dir = try fs.cwd().openDirList(real_path);

0 commit comments

Comments
 (0)