diff --git a/src/Autodoc.zig b/src/Autodoc.zig index a2767aa9eeccc867c149b87c3805a746bdc4299e..b06b5176154209598067ae4c3bb26a3da5e85e67 100644 --- a/src/Autodoc.zig +++ b/src/Autodoc.zig @@ -266,12 +266,12 @@ pub fn generateZirData(self: *Autodoc) !void { // last thing (that can fail) that we do is flush buffer.flush() catch unreachable; } + // copy main.js, index.html - const docs = try self.module.comp.zig_lib_directory.join(self.arena, &.{ "docs", std.fs.path.sep_str }); - var docs_dir = std.fs.openDirAbsolute(docs, .{}) catch unreachable; + var docs_dir = try self.module.comp.zig_lib_directory.handle.openDir("docs", .{}); defer docs_dir.close(); - docs_dir.copyFile("main.js", output_dir, "main.js", .{}) catch unreachable; - docs_dir.copyFile("index.html", output_dir, "index.html", .{}) catch unreachable; + try docs_dir.copyFile("main.js", output_dir, "main.js", .{}); + try docs_dir.copyFile("index.html", output_dir, "index.html", .{}); } /// Represents a chain of scopes, used to resolve decl references to the