From 66de099de4e2e8b71de9cca77358248893248344 Mon Sep 17 00:00:00 2001 From: Eric Joldasov Date: Sun, 9 Feb 2025 14:15:35 +0500 Subject: [PATCH] change deprecated `std.fs.MAX_PATH_BYTES` to `max_path_bytes` It was deprecated before, and became hard compile error. See https://github.com/ziglang/zig/pull/19847 . Signed-off-by: Eric Joldasov --- src/main.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index 7575c1b..ddbf37d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -593,7 +593,7 @@ pub fn main() void { if (config.binreader and (export_json != null or export_bin != null)) bin_reader.import(); } else { - var buf = [_]u8{0} ** (std.fs.MAX_PATH_BYTES+1); + var buf: [std.fs.max_path_bytes+1]u8 = @splat(0); const path = if (std.posix.realpathZ(scan_dir orelse ".", buf[0..buf.len-1])) |p| buf[0..p.len:0] else |_| (scan_dir orelse ".");