Skip to content

Commit

Permalink
Zig update: use std.posix namespace instead of std.os
Browse files Browse the repository at this point in the history
  • Loading branch information
ehaas authored Mar 22, 2024
1 parent dfbd7c7 commit 9cfb6dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aro/Driver/Filesystem.zig
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn existsFake(entries: []const Filesystem.Entry, path: []const u8) bool {
}

fn canExecutePosix(path: []const u8) bool {
std.os.access(path, std.os.X_OK) catch return false;
std.posix.access(path, std.posix.X_OK) catch return false;
// Todo: ensure path is not a directory
return true;
}
Expand Down Expand Up @@ -173,7 +173,7 @@ pub const Filesystem = union(enum) {
pub fn exists(fs: Filesystem, path: []const u8) bool {
switch (fs) {
.real => {
std.os.access(path, std.os.F_OK) catch return false;
std.fs.cwd().access(path, .{}) catch return false;
return true;
},
.fake => |paths| return existsFake(paths, path),
Expand Down

0 comments on commit 9cfb6dc

Please sign in to comment.