From 77671575bd2f481651ea54e956ac5c7da8d63710 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 12:14:58 -0300 Subject: idioms #1, std.fs's deprecated aliases in the hosts: std.fs.path and std.fs.max_path_bytes are std.Io.Dir.path and std.Io.Dir.max_path_bytes in 0.17, so the hosts name them there Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/9p_io.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/9p_io.zig') diff --git a/src/9p_io.zig b/src/9p_io.zig index 6e9148b8..70bd0bbf 100644 --- a/src/9p_io.zig +++ b/src/9p_io.zig @@ -1054,7 +1054,7 @@ test "the socket name is a third prefix in the shared directory" { var buf: [sun_path_len]u8 = undefined; const p = socketPath(&buf, "/run/user/1000", "t9srv").?; try testing.expectEqualStrings("/run/user/1000/pardes-9p-t9srv.sock", p); - try testing.expect(!std.mem.startsWith(u8, std.fs.path.basename(p), "pardes-detached-")); + try testing.expect(!std.mem.startsWith(u8, std.Io.Dir.path.basename(p), "pardes-detached-")); } test "a name that is not one path component is no address at all" { @@ -1760,7 +1760,7 @@ pub fn exportEnv(serial: u32, adopts: bool) void { fn exportMount(sock_path: []const u8) void { const mntgen = if (libc.getenv("NINE_MNTGEN")) |v| std.mem.eql(u8, std.mem.span(v), "1") else false; const root = if (libc.getenv("NINE_MOUNT")) |v| std.mem.span(v) else ""; - const base = std.fs.path.basename(sock_path); + const base = std.Io.Dir.path.basename(sock_path); const sock_prefix = "pardes-9p-"; const suffix = ".sock"; if (mntgen and root.len > 0 and std.mem.startsWith(u8, base, sock_prefix) and std.mem.endsWith(u8, base, suffix) and base.len > sock_prefix.len + suffix.len) { -- cgit v1.3