diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-09 03:31:45 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-09 03:31:45 -0300 |
| commit | 7e6fc8c9f62bc3dc08e24856cc647fa0adefb32c (patch) | |
| tree | 354ff35a205535ee35f9fa272639206e16ab0cec /src/replica.zig | |
| parent | 5de9d27458cd8ff7e326532e8923c933e141ea7f (diff) | |
| download | pardes-7e6fc8c9f62bc3dc08e24856cc647fa0adefb32c.tar.gz pardes-7e6fc8c9f62bc3dc08e24856cc647fa0adefb32c.zip | |
idioms: std.Io's names for the std.fs aliases left in Addon, Kind, rollback and replica (std.Io.Dir.path, std.Io.Dir.max_path_bytes), and the window's handover dump written and removed through the shell's io (Io.Dir.writeFile at 0600, deleteFile) instead of libc open, write and unlink
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/replica.zig')
| -rw-r--r-- | src/replica.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/replica.zig b/src/replica.zig index b88b1328..8b0f8c8e 100644 --- a/src/replica.zig +++ b/src/replica.zig @@ -3113,7 +3113,7 @@ fn deliver(a: *Authority, screens: *Screens, peer: u16, r: *Replica, comptime wh /// The blob cache of a test, in its own directory (never the user's). fn testCache(tmp: *std.testing.TmpDir, buf: *[4200]u8, cap: u64) !Cache { - var dir_buf: [std.fs.max_path_bytes]u8 = undefined; + var dir_buf: [std.Io.Dir.max_path_bytes]u8 = undefined; const dir = dir_buf[0..try tmp.dir.realPath(std.testing.io, &dir_buf)]; return Cache.of(try std.fmt.bufPrint(buf, "{s}/" ++ Cache.name, .{dir}), cap); } @@ -3994,8 +3994,8 @@ test "a replica joined after a pane closed: the session's jump to it, its Panes const a = try Authority.init(gpa, .{ .cols = 80, .rows = 24, .file = "mise.toml" }, TestHost.host(), false); defer a.deinit(); // A file looked at and closed: a jump to it, Recent's, a closed pane. - var cwd: [std.fs.max_path_bytes]u8 = undefined; - var line: [std.fs.max_path_bytes + 32]u8 = undefined; + var cwd: [std.Io.Dir.max_path_bytes]u8 = undefined; + var line: [std.Io.Dir.max_path_bytes + 32]u8 = undefined; const dir = std.mem.span(@as([*:0]u8, @ptrCast(std.c.getcwd(&cwd, cwd.len) orelse return error.NoCwd))); _ = try a.local(.{ .command = try std.fmt.bufPrint(&line, "Look {s}/build.zig.zon", .{dir}) }); _ = try a.local(.{ .command = "Del" }); @@ -4045,8 +4045,8 @@ test "a replica's Del of a file its session's Recent knows asks the host what th const gpa = std.testing.allocator; const a = try Authority.init(gpa, .{ .cols = 80, .rows = 24, .file = "mise.toml" }, TestHost.host(), false); defer a.deinit(); - var cwd: [std.fs.max_path_bytes]u8 = undefined; - var line: [std.fs.max_path_bytes + 32]u8 = undefined; + var cwd: [std.Io.Dir.max_path_bytes]u8 = undefined; + var line: [std.Io.Dir.max_path_bytes + 32]u8 = undefined; const dir = std.mem.span(@as([*:0]u8, @ptrCast(std.c.getcwd(&cwd, cwd.len) orelse return error.NoCwd))); _ = try a.local(.{ .command = try std.fmt.bufPrint(&line, "Look {s}/build.zig.zon", .{dir}) }); // Joined while it is open: in the session's Recent, in no replica's. |
