Fixed a couple stupid mistakes

This commit is contained in:
Caleb J. Gardner
2026-06-17 22:30:53 -05:00
parent d4f069b57a
commit f47ef9ee46
3 changed files with 3 additions and 11 deletions
-9
View File
@@ -92,9 +92,6 @@ fn extractDir(
path: []const u8,
options: ExtractionOptions,
) !void {
std.debug.print("starting extract dir: {s}\n", .{path});
defer std.debug.print("end extract dir: {s}\n", .{path});
var xattr_idx: ?u32 = null;
try Io.Dir.cwd().createDirPath(io, path);
@@ -149,8 +146,6 @@ fn extractFile(
path: []const u8,
options: ExtractionOptions,
) !void {
std.debug.print("starting extract file: {s}\n", .{path});
defer std.debug.print("end extract file: {s}\n", .{path});
var xattr_idx: ?u32 = null;
var rdr: DataReader = switch (inode.data) {
@@ -201,8 +196,6 @@ fn extractFile(
try setMetadata(alloc, io, id_table, xattr_table, inode, path, options, xattr_idx);
}
fn extractSymlink(io: Io, inode: Inode, path: []const u8) !void {
std.debug.print("starting extract symlink: {s}\n", .{path});
defer std.debug.print("end extract symlink: {s}\n", .{path});
return switch (inode.data) {
.symlink => |s| Io.Dir.cwd().symLink(io, s.target, path, .{}),
.ext_symlink => |s| Io.Dir.cwd().symLink(io, s.target, path, .{}),
@@ -218,8 +211,6 @@ fn extractNod(
path: []const u8,
options: ExtractionOptions,
) !void {
std.debug.print("starting extract nod: {s}\n", .{path});
defer std.debug.print("end extract nod: {s}\n", .{path});
var dev: u32 = 0;
var mode: u32 = undefined;
+1
View File
@@ -98,6 +98,7 @@ fn readVec(r: *Reader, vec: [][]u8) Reader.Error!usize {
@memcpy(v[0..to_cpy], r.buffer[r.seek..][0..to_cpy]);
wrote += to_cpy;
r.seek += to_cpy;
if (r.seek >= r.end) break;
}
+2 -2
View File
@@ -67,7 +67,7 @@ test "ExtractCompleteArchiveSingleThreadedOption" {
const io = testing.io;
const alloc = testing.allocator;
Io.Dir.cwd().deleteFile(io, TestFullExtractLocationSTOption) catch {};
Io.Dir.cwd().deleteTree(io, TestFullExtractLocationSTOption) catch {};
var archive_file = try Io.Dir.cwd().openFile(io, TestArchive, .{});
defer archive_file.close(io);
@@ -84,7 +84,7 @@ test "ExtractCompleteArchiveMultiThreaded" {
const io = testing.io;
const alloc = testing.allocator;
Io.Dir.cwd().deleteFile(io, TestFullExtractLocationMT) catch {};
Io.Dir.cwd().deleteTree(io, TestFullExtractLocationMT) catch {};
var archive_file = try Io.Dir.cwd().openFile(io, TestArchive, .{});
defer archive_file.close(io);