From b4dc9f1d4d147da4b8753b18b6f97095d745d89f 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 8a834b9..0456286 100644 --- a/src/main.zig +++ b/src/main.zig @@ -637,7 +637,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 ".");