diff options
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig index 623b6033..68542b3e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -639,9 +639,9 @@ fn nativeMain(std_init: std.process.Init) !void { // A name not there yet, as acme's B takes one: its directory // resolved and the name kept, a pane made for it that Save // creates the file from. - const base = std.fs.path.basename(target.path); + const base = std.Io.Dir.path.basename(target.path); if (base.len == 0 or std.mem.eql(u8, base, ".") or std.mem.eql(u8, base, "..")) Refuse.with(init.io, word, error.NotAFileName); - const dir = pardes.filesystem.resolveOs(std.fs.path.dirname(target.path) orelse ".", &realbuf) orelse { + const dir = pardes.filesystem.resolveOs(std.Io.Dir.path.dirname(target.path) orelse ".", &realbuf) orelse { // Its directory not there either: the name made absolute as // written, and the pane's Save makes the directories. var cwd_buf: [4096]u8 = undefined; @@ -650,7 +650,7 @@ fn nativeMain(std_init: std.process.Init) !void { const absolute = std.fs.path.resolvePosix(arena, &.{ cwd, target.path }) catch |err| Refuse.with(init.io, word, err); // Missing because one above may not be searched or written: // its Save could never make it, so refused now. - if (pardes.filesystem.deniedAbove(std.fs.path.dirname(absolute) orelse "/")) Refuse.with(init.io, word, error.DirectoryNotWritable); + if (pardes.filesystem.deniedAbove(std.Io.Dir.path.dirname(absolute) orelse "/")) Refuse.with(init.io, word, error.DirectoryNotWritable); break :named absolute; }; // A directory that is there but may not be read or written: a @@ -1111,9 +1111,9 @@ test { /// $XDG_STATE_HOME/pardes, else ~/.local/state/pardes. A state file that /// holds no Recent yet reads them once (Db.zig). fn oldRecentDir(arena: std.mem.Allocator, env: *const std.process.Environ.Map) ?[]const u8 { - if (env.get("XDG_STATE_HOME")) |base| if (base.len != 0 and std.fs.path.isAbsolute(base)) - return std.fs.path.join(arena, &.{ base, "pardes" }) catch null; + if (env.get("XDG_STATE_HOME")) |base| if (base.len != 0 and std.Io.Dir.path.isAbsolute(base)) + return std.Io.Dir.path.join(arena, &.{ base, "pardes" }) catch null; const home = env.get("HOME") orelse return null; if (home.len == 0) return null; - return std.fs.path.join(arena, &.{ home, ".local", "state", "pardes" }) catch null; + return std.Io.Dir.path.join(arena, &.{ home, ".local", "state", "pardes" }) catch null; } |
