mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 10:07:02 -06:00
18.05
This commit is contained in:
@@ -139,11 +139,10 @@ static unsigned ReadVarInt(const Byte *p, size_t maxSize, UInt64 *val)
|
||||
{
|
||||
*val = 0;
|
||||
|
||||
for (unsigned i = 0; i < maxSize;)
|
||||
for (unsigned i = 0; i < maxSize && i < 10;)
|
||||
{
|
||||
Byte b = p[i];
|
||||
if (i < 10)
|
||||
*val |= (UInt64)(b & 0x7F) << (7 * i);
|
||||
*val |= (UInt64)(b & 0x7F) << (7 * i);
|
||||
i++;
|
||||
if ((b & 0x80) == 0)
|
||||
return i;
|
||||
@@ -1363,7 +1362,9 @@ static const Byte kProps[] =
|
||||
kpidCharacts,
|
||||
kpidSymLink,
|
||||
kpidHardLink,
|
||||
kpidCopyLink
|
||||
kpidCopyLink,
|
||||
|
||||
kpidVolumeIndex
|
||||
};
|
||||
|
||||
|
||||
@@ -1794,6 +1795,18 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
|
||||
|
||||
case kpidSplitBefore: prop = item.IsSplitBefore(); break;
|
||||
case kpidSplitAfter: prop = lastItem.IsSplitAfter(); break;
|
||||
|
||||
case kpidVolumeIndex:
|
||||
{
|
||||
if (item.VolIndex < _arcs.Size())
|
||||
{
|
||||
const CInArcInfo &arcInfo = _arcs[item.VolIndex].Info;
|
||||
if (arcInfo.IsVolume())
|
||||
prop = (UInt64)arcInfo.GetVolIndex();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case kpidCRC:
|
||||
{
|
||||
const CItem *item2 = (lastItem.IsSplitAfter() ? &item : &lastItem);
|
||||
|
||||
@@ -180,7 +180,7 @@ struct CItem
|
||||
|
||||
AString Name;
|
||||
|
||||
int VolIndex;
|
||||
unsigned VolIndex;
|
||||
int NextItem;
|
||||
|
||||
UInt32 UnixMTime;
|
||||
|
||||
@@ -777,7 +777,9 @@ static const Byte kProps[] =
|
||||
kpidCRC,
|
||||
kpidHostOS,
|
||||
kpidMethod,
|
||||
kpidUnpackVer
|
||||
kpidUnpackVer,
|
||||
|
||||
kpidVolumeIndex
|
||||
};
|
||||
|
||||
static const Byte kArcProps[] =
|
||||
@@ -995,6 +997,12 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
|
||||
case kpidCommented: prop = item.IsCommented(); break;
|
||||
case kpidSplitBefore: prop = item.IsSplitBefore(); break;
|
||||
case kpidSplitAfter: prop = _items[refItem.ItemIndex + refItem.NumItems - 1].IsSplitAfter(); break;
|
||||
|
||||
case kpidVolumeIndex:
|
||||
if (_arcInfo.Is_VolNumber_Defined())
|
||||
prop = (UInt32)(_arcInfo.VolNumber + refItem.VolumeIndex);
|
||||
break;
|
||||
|
||||
case kpidCRC:
|
||||
{
|
||||
prop = ((lastItem.IsSplitAfter()) ? item.FileCRC : lastItem.FileCRC);
|
||||
|
||||
@@ -26,7 +26,7 @@ struct CInArcInfo
|
||||
UInt32 DataCRC;
|
||||
bool EndOfArchive_was_Read;
|
||||
|
||||
CInArcInfo(): EndFlags(0), EndOfArchive_was_Read(false) {}
|
||||
CInArcInfo(): EndFlags(0), EndOfArchive_was_Read(false), VolNumber(0) {}
|
||||
|
||||
UInt64 GetPhySize() const { return EndPos - StartPos; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user