Skip to content

Commit

Permalink
Update header.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch authored Nov 12, 2024
1 parent 2064e86 commit 779e634
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ impl Header {

fn is_ustar(&self) -> bool {
let ustar = unsafe { cast::<_, UstarHeader>(self) };
ustar.magic[..] == b"ustar\0"[..] && ustar.version[..] == b"00"[..]
ustar.magic[..] == b"ustar\0"[..]
&& (ustar.version[..] == b"00"[..] || ustar.version[..] == b"\0\0"[..])
}

fn is_gnu(&self) -> bool {
Expand Down

0 comments on commit 779e634

Please sign in to comment.