summaryrefslogtreecommitdiff
path: root/src/9p_io.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 12:14:58 -0300
committerGabriel Schneider <[email protected]>2026-11-06 14:56:36 -0300
commit77671575bd2f481651ea54e956ac5c7da8d63710 (patch)
treedef07749c63bdc279e0119d58101aa1399dd5cf3 /src/9p_io.zig
parentb5bb5e8ccf71a5755dde95f04440ee9c6aaa18da (diff)
downloadpardes-77671575bd2f481651ea54e956ac5c7da8d63710.tar.gz
pardes-77671575bd2f481651ea54e956ac5c7da8d63710.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/9p_io.zig')
-rw-r--r--src/9p_io.zig4
1 files changed, 2 insertions, 2 deletions
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) {