╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │61 \\-----END OPENSSH PRIVATE KEY----- │ │62 \\ │ │63 ); │ │64 - if (.windows != builtin.os.tag) { │ │65 - try priv_key_file.setPermissions(io, @enumFromInt(0o600)); │ │64 + if (.windows != builtin.target.os.tag) { │ │65 + try priv_key_file.setPermissions(io, @fromBackingInt(@intCast(0o600)));│ │66 } │ │67 } │ │68 │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │69 const cwd_path = try std.process.currentPathAlloc(io, allocator); │ │70 defer allocator.free(cwd_path); │ │71 - const key_path = try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "key" }); │ │71 + const key_path = try std.Io.Dir.path.join(allocator, &.{ cwd_path, temp_dir_name, "key" });│ │72 defer allocator.free(key_path); │ │73 │ │74 var cli = false; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │85 } │ │86 } │ │87 var serve_options = try hx.command.parseServeOptions(allocator, serve_args.items); │ │88 - const git_ssh_prefix = if (builtin.mode == .Debug) │ │89 - try std.fmt.allocPrint(allocator, "GIT_SSH_COMMAND='ssh -i \"{s}\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR' \\\r\n", .{key_path})│ │88 + const git_ssh_prefix = if (builtin.mode == .debug) │ │89 + try allocator.print("GIT_SSH_COMMAND='ssh -i \"{s}\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR' \\\r\n", .{key_path}) │ │90 else │ │91 ""; │ │92 defer if (git_ssh_prefix.len != 0) allocator.free(git_ssh_prefix); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 94 serve_options.fallback_on_address_in_use = true; │ │ 95 │ │ 96 const server_path = if (std.mem.eql(u8, serve_options.data_dir, ".")) │ │ 97 - try std.fs.path.join(allocator, &.{ cwd_path, temp_dir_name, "server" }) │ │ 97 + try std.Io.Dir.path.join(allocator, &.{ cwd_path, temp_dir_name, "server" }) │ │ 98 else │ │ 99 - try std.fs.path.resolve(allocator, &.{ cwd_path, serve_options.data_dir }); │ │ 99 + try std.Io.Dir.path.resolveAlloc(allocator, &.{ cwd_path, serve_options.data_dir });│ │100 defer allocator.free(server_path); │ │101 serve_options.data_dir = server_path; │ │102 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │103 - const work_path = try std.fs.path.join(allocator, &.{ server_path, "admin" }); │ │103 + const work_path = try std.Io.Dir.path.join(allocator, &.{ server_path, "admin" });│ │104 defer allocator.free(work_path); │ │105 │ │106 const Repo = rp.Repo(.xit, evt.admin_repo_opts); │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │229 }; │ │230 } │ │231 // commit the seed events and consume them into the database │ │232 - const users_dir = try std.fs.path.join(arena.allocator(), &.{ server_path, "users" }); │ │232 + const users_dir = try std.Io.Dir.path.join(arena.allocator(), &.{ server_path, "users" }); │ │233 try evt.consume(.{ .server = .{ .users_dir = users_dir } }, .admin, .xit, evt.admin_repo_opts, io, allocator, &repo, evt.events_ref, &events_to_consume);│ │234 │ │235 // admin is granted ownership of every repo, so it has full privileges │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │281 // every repo gets the same generated history, so build it once into a │ │282 // template repo and copy that to each repo's location below rather than │ │283 // redoing the expensive commit work for every repo. │ │284 - const template_path = try std.fs.path.join(arena.allocator(), &.{ cwd_path, temp_dir_name, "template" }); │ │284 + const template_path = try std.Io.Dir.path.join(arena.allocator(), &.{ cwd_path, temp_dir_name, "template" });│ │285 { │ │286 var template_repo = try rp.Repo(.xit, .{}).init(io, allocator, .{ .path = template_path }); │ │287 defer template_repo.deinit(io, allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │905 │ │906 // let the native TUI's page builders open the on-disk repos for the file tree │ │907 session.io = io; │ │908 - session.users_dir = try std.fs.path.join(session_arena.allocator(), &.{ server_path, "users" }); │ │908 + session.users_dir = try std.Io.Dir.path.join(session_arena.allocator(), &.{ server_path, "users" });│ │909 │ │910 // leave a one-shot session for the first browser to hit the web ui, so it │ │911 // starts logged in as admin │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │1100 defer fork_dir.close(io); │ │1101 var writer = std.Io.Writer.Allocating.init(allocator); │ │1102 defer writer.deinit(); │ │1103 - if (std.fs.path.dirname(path)) |dir| try fork_dir.createDirPath(io, dir); │ │1103 + if (std.Io.Dir.path.dirname(path)) |dir| try fork_dir.createDirPath(io, dir);│ │1104 for (contents, 0..) |content, i| { │ │1105 { │ │1106 const file = try fork_dir.createFile(io, path, .{}); │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │1213 }, │ │1214 }; │ │1215 │ │1216 - const users_dir = try std.fs.path.join(allocator, &.{ server_path, "users" }); │ │1216 + const users_dir = try std.Io.Dir.path.join(allocator, &.{ server_path, "users" }); │ │1217 defer allocator.free(users_dir); │ │1218 const patch_author = evt.CommitAuthor{ .name = "admin", .email = "admin@example.test" };│ │1219 var patch_ids: [patch_data.len][evt.event_id_size]u8 = undefined; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯