Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ianic committed Apr 13, 2024
1 parent f4befb1 commit fe897a2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Compilation.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3762,7 +3762,7 @@ fn docsCopyModule(comp: *Compilation, module: *Package.Module, name: []const u8,
defer walker.deinit();

var archiver = std.tar.writer(tar_file.writer().any());
archiver.prefix = module.fully_qualified_name;
archiver.prefix = name;

while (try walker.next()) |entry| {
switch (entry.kind) {
Expand All @@ -3773,7 +3773,11 @@ fn docsCopyModule(comp: *Compilation, module: *Package.Module, name: []const u8,
},
else => continue,
}
var file = try entry.dir.openFile(entry.basename, .{});
var file = mod_dir.openFile(entry.path, .{}) catch |err| {
return comp.lockAndSetMiscFailure(.docs_copy, "unable to open '{}{s}': {s}", .{
root, entry.path, @errorName(err),
});
};
defer file.close();
archiver.writeFile(entry.path, file) catch |err| {
return comp.lockAndSetMiscFailure(.docs_copy, "unable to archive '{}{s}': {s}", .{
Expand Down

0 comments on commit fe897a2

Please sign in to comment.