summaryrefslogtreecommitdiff
path: root/src/Core.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core.zig')
-rw-r--r--src/Core.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Core.zig b/src/Core.zig
index c7d2fd48..413de233 100644
--- a/src/Core.zig
+++ b/src/Core.zig
@@ -551,7 +551,7 @@ fn initSession(gpa: std.mem.Allocator, opts: Options) !*Pardes {
};
const content = try std.fmt.allocPrint(gpa, "cannot open\n\n\t{s}\n\n{s}\n", .{ path, why });
errdefer gpa.free(content);
- _ = try pardes.panes.Output.open(p, 0, std.fs.path.dirname(path) orelse "/", .errors, "", content);
+ _ = try pardes.panes.Output.open(p, 0, std.Io.Dir.path.dirname(path) orelse "/", .errors, "", content);
}
p.oneColumn();
},
@@ -574,7 +574,7 @@ fn initSession(gpa: std.mem.Allocator, opts: Options) !*Pardes {
const dir = p.sessionDir();
const shown = try pardes.panes.Output.open(p, 0, dir, .{ .cmd = .New }, "", content);
// Named +Pager, as `pardes -` inside a session names its pane.
- const named = try std.fs.path.join(gpa, &.{ dir, "+Pager" });
+ const named = try std.Io.Dir.path.join(gpa, &.{ dir, "+Pager" });
gpa.free(shown.file.?.path);
shown.file.?.path = named;
shown.file.?.pager = true;
@@ -981,7 +981,7 @@ pub fn acknowledgeShell(p: *Pardes, id: usize, executable: []const u8, prompt_ma
if (pane.command == null) {
// A shell given as a path keeps it: its bare name would find
// nothing, or another program, on the usual paths.
- const base = if (pane.shell) |given| (if (std.mem.indexOfScalar(u8, given, '/') != null) given else std.fs.path.basename(executable)) else std.fs.path.basename(executable);
+ const base = if (pane.shell) |given| (if (std.mem.indexOfScalar(u8, given, '/') != null) given else std.Io.Dir.path.basename(executable)) else std.Io.Dir.path.basename(executable);
const rest = tagline.terminal_pane_tail[" Term".len..];
if (std.fmt.bufPrint(&pane.shell_tail, " Term+{s}{s}", .{ base, rest })) |tail| {
pane.shell_tail_len = @intCast(tail.len);
@@ -1311,7 +1311,7 @@ fn sayShellFailure(p: *Pardes, id: u8, err: anyerror) void {
/// The program the shell's `#!` names that is not there, in `out`.
fn missingInterpreter(bin: []const u8, out: []u8) ?[]const u8 {
const Shell = @import("host_io.zig").Shell;
- var buf: [std.fs.max_path_bytes]u8 = undefined;
+ var buf: [std.Io.Dir.max_path_bytes]u8 = undefined;
return Shell.missingInterpreter(Shell.find(bin, &buf) orelse return null, out);
}
@@ -1319,7 +1319,7 @@ fn missingInterpreter(bin: []const u8, out: []u8) ?[]const u8 {
/// what is there (a directory when it is no local path), whether it is
/// missing, and whether that is because one above refuses (EACCES).
fn parentTrouble(path: []const u8, err: anyerror) struct { dir: []const u8, kind: ?std.Io.File.Kind, missing: bool, denied: bool } {
- const dir = std.fs.path.dirname(path) orelse "/";
+ const dir = std.Io.Dir.path.dirname(path) orelse "/";
const local = filesystem.localPath(dir);
const kind: ?std.Io.File.Kind = if (local) |l| exec.kindOf(l) else .directory;
const missing = err == error.FileNotFound or err == error.NotDir or kind != .directory;