From 24047f723f23fe186c69ca3bf7f5069318c5152e Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Sat, 10 Feb 2024 20:34:03 +0100 Subject: [PATCH] remove async integration The async mode has been removed in ziglang/zig#18712 --- known-folders.zig | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/known-folders.zig b/known-folders.zig index f7ca20f..429cdfe 100644 --- a/known-folders.zig +++ b/known-folders.zig @@ -163,14 +163,7 @@ fn getPathXdg(allocator: std.mem.Allocator, arena: *std.heap.ArenaAllocator, fol if (!folder_spec.env.user_dir) break :env_opt null; // TODO: add caching so we only need to read once in a run - const config_dir_path = if (std.io.is_async) blk: { - var frame = arena.allocator().create(@Frame(getPathXdg)) catch break :env_opt null; - _ = @asyncCall(frame, {}, getPathXdg, .{ arena.allocator(), arena, .local_configuration }); - break :blk (await frame) catch null orelse break :env_opt null; - } else blk: { - break :blk getPathXdg(arena.allocator(), arena, .local_configuration) catch null orelse break :env_opt null; - }; - + const config_dir_path = getPathXdg(arena.allocator(), arena, .local_configuration) catch null orelse break :env_opt null; const config_dir = std.fs.cwd().openDir(config_dir_path, .{}) catch break :env_opt null; const home = std.process.getEnvVarOwned(arena.allocator(), "HOME") catch null orelse break :env_opt null; const user_dirs = config_dir.openFile("user-dirs.dirs", .{}) catch null orelse break :env_opt null;