docs: make docs work with recent tar changes

It is no longer need to call skip if file content is not consumed. It is
handled internally now. File types are now same as in os.File.
This commit is contained in:
Igor Anić 2024-03-11 13:30:26 +01:00
parent 0cca7e732e
commit c974e19816

View File

@ -767,7 +767,7 @@ fn unpack_inner(tar_bytes: []u8) !void {
});
while (try it.next()) |tar_file| {
switch (tar_file.kind) {
.normal => {
.file => {
if (tar_file.size == 0 and tar_file.name.len == 0) break;
if (std.mem.endsWith(u8, tar_file.name, ".zig")) {
log.debug("found file: '{s}'", .{tar_file.name});
@ -790,7 +790,6 @@ fn unpack_inner(tar_bytes: []u8) !void {
tar_file.name,
});
}
try tar_file.skip();
},
else => continue,
}