Small change/fix when applying permissions
This commit is contained in:
+1
-4
@@ -230,10 +230,7 @@ pub fn extractToThreaded(self: Inode, archive: *Archive, path: []const u8, optio
|
|||||||
if (out_err != null) return out_err.?;
|
if (out_err != null) return out_err.?;
|
||||||
|
|
||||||
if (perms != null) {
|
if (perms != null) {
|
||||||
var i = perms.?.items.len;
|
for (perms.?.items) |p| {
|
||||||
while (i > 0) {
|
|
||||||
i -= 1;
|
|
||||||
const p = perms.?.items[i];
|
|
||||||
var fil = try std.fs.cwd().openFile(p.path, .{});
|
var fil = try std.fs.cwd().openFile(p.path, .{});
|
||||||
try fil.chmod(p.perm);
|
try fil.chmod(p.perm);
|
||||||
try fil.chown(p.uid, p.gid);
|
try fil.chown(p.uid, p.gid);
|
||||||
|
|||||||
Reference in New Issue
Block a user