Update to 7-Zip Version 22.00

See: https://sourceforge.net/p/sevenzip/discussion/45797/thread/9c2d9061ce/
This commit is contained in:
Tino Reichardt
2022-08-07 09:59:33 +02:00
parent 6a4fe97fc3
commit 57558682a8
211 changed files with 15251 additions and 2482 deletions

View File

@@ -27,11 +27,17 @@ static void UdfTimeToFileTime(const CTime &t, NWindows::NCOM::CPropVariant &prop
return;
if (t.IsLocal())
numSecs -= (Int64)((Int32)t.GetMinutesOffset() * 60);
FILETIME ft;
UInt64 v = (((numSecs * 100 + d[9]) * 100 + d[10]) * 100 + d[11]) * 10;
ft.dwLowDateTime = (UInt32)v;
ft.dwHighDateTime = (UInt32)(v >> 32);
prop = ft;
const UInt32 m0 = d[9];
const UInt32 m1 = d[10];
const UInt32 m2 = d[11];
unsigned numDigits = 0;
UInt64 v = numSecs * 10000000;
if (m0 < 100 && m1 < 100 && m2 < 100)
{
v += m0 * 100000 + m1 * 1000 + m2 * 10;
numDigits = 6;
}
prop.SetAsTimeFrom_Ft64_Prec(v, k_PropVar_TimePrec_Base + numDigits);
}
static const Byte kProps[] =
@@ -41,7 +47,8 @@ static const Byte kProps[] =
kpidSize,
kpidPackSize,
kpidMTime,
kpidATime
kpidATime,
kpidChangeTime
};
static const Byte kArcProps[] =
@@ -205,6 +212,7 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
case kpidPackSize: if (!item.IsDir()) prop = (UInt64)item.NumLogBlockRecorded * vol.BlockSize; break;
case kpidMTime: UdfTimeToFileTime(item.MTime, prop); break;
case kpidATime: UdfTimeToFileTime(item.ATime, prop); break;
case kpidChangeTime: UdfTimeToFileTime(item.AttribTime, prop); break;
}
}
prop.Detach(value);

View File

@@ -333,7 +333,7 @@ void CItem::Parse(const Byte *p)
NumLogBlockRecorded = Get64(p + 64);
ATime.Parse(p + 72);
MTime.Parse(p + 84);
// AttrtTime.Parse(p + 96);
AttribTime.Parse(p + 96);
// CheckPoint = Get32(p + 108);
// ExtendedAttrIcb.Parse(p + 112);
// ImplId.Parse(p + 128);

View File

@@ -243,7 +243,7 @@ struct CItem
UInt64 NumLogBlockRecorded;
CTime ATime;
CTime MTime;
// CTime AttrtTime;
CTime AttribTime; // Attribute time : most recent date and time of the day of file creation or modification of the attributes of.
// UInt32 CheckPoint;
// CLongAllocDesc ExtendedAttrIcb;
// CRegId ImplId;