mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-09 08:07:19 -06:00
21.02
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#define __ARCHIVE_TAR_ITEM_H
|
||||
|
||||
#include "../../../Common/MyLinux.h"
|
||||
#include "../../../Common/UTFConvert.h"
|
||||
|
||||
#include "../Common/ItemNameUtils.h"
|
||||
|
||||
@@ -108,8 +109,52 @@ struct CItem
|
||||
}
|
||||
|
||||
UInt64 GetPackSizeAligned() const { return (PackSize + 0x1FF) & (~((UInt64)0x1FF)); }
|
||||
|
||||
bool IsThereWarning() const
|
||||
{
|
||||
// that Header Warning is possible if (Size != 0) for dir item
|
||||
return (PackSize < Size) && (LinkFlag == NFileHeader::NLinkFlag::kDirectory);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct CEncodingCharacts
|
||||
{
|
||||
bool IsAscii;
|
||||
// bool Oem_Checked;
|
||||
// bool Oem_Ok;
|
||||
// bool Utf_Checked;
|
||||
CUtf8Check UtfCheck;
|
||||
|
||||
void Clear()
|
||||
{
|
||||
IsAscii = true;
|
||||
// Oem_Checked = false;
|
||||
// Oem_Ok = false;
|
||||
// Utf_Checked = false;
|
||||
UtfCheck.Clear();
|
||||
}
|
||||
|
||||
void Update(const CEncodingCharacts &ec)
|
||||
{
|
||||
if (!ec.IsAscii)
|
||||
IsAscii = false;
|
||||
|
||||
// if (ec.Utf_Checked)
|
||||
{
|
||||
UtfCheck.Update(ec.UtfCheck);
|
||||
// Utf_Checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
CEncodingCharacts() { Clear(); }
|
||||
void Check(const AString &s);
|
||||
AString GetCharactsString() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct CItemEx: public CItem
|
||||
{
|
||||
UInt64 HeaderPos;
|
||||
@@ -117,6 +162,8 @@ struct CItemEx: public CItem
|
||||
bool NameCouldBeReduced;
|
||||
bool LinkNameCouldBeReduced;
|
||||
|
||||
CEncodingCharacts EncodingCharacts;
|
||||
|
||||
UInt64 GetDataPosition() const { return HeaderPos + HeaderSize; }
|
||||
UInt64 GetFullSize() const { return HeaderSize + PackSize; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user