Skip to content

Commit

Permalink
adjusted uid casting
Browse files Browse the repository at this point in the history
  • Loading branch information
NodyHub committed Jan 8, 2025
1 parent 45cb851 commit 5c74796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unpack_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestUnpackWithPreserveOwnershipAsRoot(t *testing.T) {
if err != nil {
t.Fatalf("error getting file stats: %v", err)
}
uidMatch := stat.Sys().(*syscall.Stat_t).Uid != uint32(c.Uid)
uidMatch := c.Uid == int(stat.Sys().(*syscall.Stat_t).Uid)
if expectUidMatch != uidMatch {
t.Fatalf("expected uid %d, got %d, file %s", c.Uid, stat.Sys().(*syscall.Stat_t).Uid, c.Name)
}
Expand Down

0 comments on commit 5c74796

Please sign in to comment.