summaryrefslogtreecommitdiff
path: root/src/host_io.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/host_io.zig')
-rw-r--r--src/host_io.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/host_io.zig b/src/host_io.zig
index 8bbb0985..9d4b27c2 100644
--- a/src/host_io.zig
+++ b/src/host_io.zig
@@ -1048,7 +1048,7 @@ pub const Shell = struct {
var buf: [2048]u8 = undefined;
try std.testing.expectEqualStrings(bash_rc, readSmall(a_bash, &buf) orelse return error.ReadFailed);
try std.testing.expectEqualStrings(fish_rc, readSmall(a.fishPath().?, &buf) orelse return error.ReadFailed);
- const stat = try std.Io.Dir.cwd().statFile(std.testing.io, a_bash, .{});
+ const stat = try @import("fs.zig").statPath(std.testing.io, a_bash, .{});
try std.testing.expectEqual(0, stat.permissions.toMode() & 0o077);
var kept: [rc_path_capacity:0]u8 = @splat(0);
@memcpy(kept[0..a_bash.len], a_bash);
@@ -1202,7 +1202,7 @@ pub fn forkShell(
// A shell's directory may be inside a mount this editor serves.
pardes.turn.yield();
defer pardes.turn.back();
- const stat = try std.Io.Dir.cwd().statFile(std.Io.Threaded.global_single_threaded.io(), path, .{});
+ const stat = try @import("fs.zig").statPath(std.Io.Threaded.global_single_threaded.io(), path, .{});
if (stat.kind != .directory) return error.NotDir;
break :dir path;
};
@@ -1440,7 +1440,7 @@ pub fn shellCwd(pid: libc.pid_t, buf: []u8) ?[]const u8 {
// no directory to be named by, so the name it had stays, and a
// restart works there once it is back.
if (std.mem.endsWith(u8, link, " (deleted)")) {
- _ = std.Io.Dir.cwd().statFile(std.Io.Threaded.global_single_threaded.io(), link, .{}) catch return null;
+ _ = @import("fs.zig").statPath(std.Io.Threaded.global_single_threaded.io(), link, .{}) catch return null;
}
return link;
},