authorgravatar for igor.anic@gmail.comIgor Anić <igor.anic@gmail.com> 2024-03-11 13:30:26+01:00
committergravatar for igor.anic@gmail.comIgor Anić <igor.anic@gmail.com> 2024-03-11 13:30:26+01:00
logc974e198164e13fea491e3897a04ec82d132fbf6
tree1f5335a12c44823e690f972a4eb7ac90cd4e3b81
parent0cca7e732eb7f9ced1ecef6cf463c987df32e8e6

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.

1 files changed, 1 insertions(+), 2 deletions(-)

lib/docs/wasm/main.zig+1-2
...@@ -767,7 +767,7 @@ fn unpack_inner(tar_bytes: []u8) !void {...@@ -767,7 +767,7 @@ fn unpack_inner(tar_bytes: []u8) !void {
767 });767 });
768 while (try it.next()) |tar_file| {768 while (try it.next()) |tar_file| {
769 switch (tar_file.kind) {769 switch (tar_file.kind) {
770 .normal => {770 .file => {
771 if (tar_file.size == 0 and tar_file.name.len == 0) break;771 if (tar_file.size == 0 and tar_file.name.len == 0) break;
772 if (std.mem.endsWith(u8, tar_file.name, ".zig")) {772 if (std.mem.endsWith(u8, tar_file.name, ".zig")) {
773 log.debug("found file: '{s}'", .{tar_file.name});773 log.debug("found file: '{s}'", .{tar_file.name});
...@@ -790,7 +790,6 @@ fn unpack_inner(tar_bytes: []u8) !void {...@@ -790,7 +790,6 @@ fn unpack_inner(tar_bytes: []u8) !void {
790 tar_file.name,790 tar_file.name,
791 });791 });
792 }792 }
793 try tar_file.skip();
794 },793 },
795 else => continue,794 else => continue,
796 }795 }