LibArchive: Add TarFileHeader::content_is_like_extended_header()
This commit is contained in:
parent
e2d71823d3
commit
e0dba2b81b
Notes:
sideshowbarker
2024-07-17 17:55:01 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/e0dba2b81b Pull-request: https://github.com/SerenityOS/serenity/pull/12876
2 changed files with 7 additions and 0 deletions
|
@ -30,4 +30,9 @@ void TarFileHeader::calculate_checksum()
|
|||
VERIFY(String::formatted("{:06o}", expected_checksum()).copy_characters_to_buffer(m_checksum, sizeof(m_checksum)));
|
||||
}
|
||||
|
||||
bool TarFileHeader::content_is_like_extended_header() const
|
||||
{
|
||||
return type_flag() == TarFileType::ExtendedHeader || type_flag() == TarFileType::GlobalExtendedHeader;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -116,6 +116,8 @@ public:
|
|||
unsigned expected_checksum() const;
|
||||
void calculate_checksum();
|
||||
|
||||
bool content_is_like_extended_header() const;
|
||||
|
||||
private:
|
||||
char m_filename[100] { 0 };
|
||||
char m_mode[8] { 0 };
|
||||
|
|
Loading…
Add table
Reference in a new issue