Fixed (hopefully) the last lingering issues.
This commit is contained in:
@@ -74,7 +74,11 @@ pub fn extract(
|
||||
),
|
||||
}
|
||||
|
||||
try loop.await(io);
|
||||
// try loop.await(io);
|
||||
loop.await(io) catch |err| {
|
||||
std.debug.print("err: {}\n", .{err});
|
||||
return err;
|
||||
};
|
||||
}
|
||||
|
||||
fn dirOrder(_: void, a: PathReturn, b: PathReturn) std.math.Order {
|
||||
@@ -139,7 +143,7 @@ fn finishLoop(alloc: std.mem.Allocator, io: Io, sel: *Io.Select(ReturnUnion), id
|
||||
}
|
||||
|
||||
while (dirs.popMax()) |path_ret| {
|
||||
if (path_ret.hdr.num != start_num)
|
||||
defer if (path_ret.hdr.num != start_num)
|
||||
alloc.free(path_ret.path);
|
||||
|
||||
var file = try Io.Dir.cwd().openFile(io, path_ret.path, .{});
|
||||
|
||||
@@ -59,13 +59,6 @@ fn setMetadata(
|
||||
var fil: Io.File = try Io.Dir.cwd().openFile(io, path, .{});
|
||||
defer fil.close(io);
|
||||
|
||||
if (!options.ignore_permissions) {
|
||||
try fil.setTimestamps(io, .{
|
||||
.modify_timestamp = .init(Io.Timestamp.fromNanoseconds(@as(i96, @intCast(inode.hdr.mod_time)) * std.time.ns_per_s)),
|
||||
});
|
||||
try fil.setPermissions(io, @enumFromInt(inode.hdr.permissions));
|
||||
try fil.setOwner(io, try id_table.get(io, inode.hdr.uid_idx), try id_table.get(io, inode.hdr.gid_idx));
|
||||
}
|
||||
if (!options.ignore_xattr and xattr_idx != null) {
|
||||
const xattr = try xattr_table.get(alloc, io, xattr_idx.?);
|
||||
defer xattr.deinit(alloc);
|
||||
@@ -76,6 +69,13 @@ fn setMetadata(
|
||||
return error.SetXattrError;
|
||||
}
|
||||
}
|
||||
if (!options.ignore_permissions) {
|
||||
try fil.setTimestamps(io, .{
|
||||
.modify_timestamp = .init(Io.Timestamp.fromNanoseconds(@as(i96, @intCast(inode.hdr.mod_time)) * std.time.ns_per_s)),
|
||||
});
|
||||
try fil.setPermissions(io, @enumFromInt(inode.hdr.permissions));
|
||||
try fil.setOwner(io, try id_table.get(io, inode.hdr.uid_idx), try id_table.get(io, inode.hdr.gid_idx));
|
||||
}
|
||||
}
|
||||
|
||||
fn extractDir(
|
||||
|
||||
Reference in New Issue
Block a user