diff options
Diffstat (limited to 'src/Dir.zig')
| -rw-r--r-- | src/Dir.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Dir.zig b/src/Dir.zig index d8d4d9b0..65e18c1a 100644 --- a/src/Dir.zig +++ b/src/Dir.zig @@ -39,7 +39,7 @@ pub fn ofName(name: []const u8) []const u8 { const dir = std.mem.trimEnd(u8, name, "/"); return if (dir.len == 0) "/" else dir; } - return std.fs.path.dirname(name) orelse "/"; + return std.Io.Dir.path.dirname(name) orelse "/"; } /// The entries of directory `dir` on this host as acme lists them @@ -105,7 +105,7 @@ fn readHost(gpa: std.mem.Allocator, local: []const u8) ![]u8 { /// first, every column as wide as the widest entry and a cell more, /// rounded up to a tab, and each row ending in a newline. Blanks pad where /// acme's tabs do: a pardes tab is a fixed width, not a stop. -pub fn columnate(gpa: std.mem.Allocator, entries: []const []const u8, width: usize) ![]u8 { +pub fn columnate(gpa: std.mem.Allocator, entries: []const []const u8, width: usize) error{OutOfMemory}![]u8 { var colw: usize = 0; for (entries) |entry| { const w = File.displayWidth(entry) + 1; @@ -194,7 +194,7 @@ pub fn look(p: *Pardes, from: usize, dir: []const u8) void { return show(p, from, i); } var said: [limits.host_path_cap + 16]u8 = undefined; - const what = std.fmt.bufPrint(&said, "look: {s}", .{name[0..@min(name.len, limits.host_path_cap)]}) catch "look"; + const what = std.fmt.bufPrint(&said, "look: {s}", .{name[0..@min(name.len, limits.host_path_cap)]}) catch unreachable; // cap and 6 fit const names = read(p.gpa, dir) catch |err| { p.gpa.free(name); return p.reportError(from, what, err); @@ -240,7 +240,7 @@ pub fn show(p: *Pardes, from: usize, id: usize) void { const serial = pane.serial; var said: [limits.host_path_cap + 16]u8 = undefined; const name = pane.file.?.path; - const what = std.fmt.bufPrint(&said, "look: {s}", .{name[0..@min(name.len, limits.host_path_cap)]}) catch "look"; + const what = std.fmt.bufPrint(&said, "look: {s}", .{name[0..@min(name.len, limits.host_path_cap)]}) catch unreachable; // cap and 6 fit refresh(p, id) catch |err| return p.reportError(from, what, err); // Closed while the turn was out: nothing to give the keyboard to. const now = p.panes[id] orelse return; |
