"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CPP/7zip/Archive/Wim/WimHandler.cpp" between
p7zip_15.14.1_src_all.tar.gz and p7zip_16.02_src_all.tar.gz

About: p7zip is a command-line file archiver with a high compression ratio (a port of the Windows program 7za.exe).

WimHandler.cpp  (p7zip_15.14.1_src_all):WimHandler.cpp  (p7zip_16.02_src_all)
skipping to change at line 130 skipping to change at line 130
case kpidSize: prop = _db.GetUnpackSize(); break; case kpidSize: prop = _db.GetUnpackSize(); break;
case kpidPackSize: prop = _db.GetPackSize(); break; case kpidPackSize: prop = _db.GetPackSize(); break;
case kpidCTime: case kpidCTime:
if (_xmls.Size() == 1) if (_xmls.Size() == 1)
{ {
const CWimXml &xml = _xmls[0]; const CWimXml &xml = _xmls[0];
int index = -1; int index = -1;
FOR_VECTOR (i, xml.Images) FOR_VECTOR (i, xml.Images)
{ {
const CImageInfo &image = xml.Images[i]; const CImageInfo &image2 = xml.Images[i];
if (image.CTimeDefined) if (image2.CTimeDefined)
if (index < 0 || ::CompareFileTime(&image.CTime, &xml.Images[index]. if (index < 0 || ::CompareFileTime(&image2.CTime, &xml.Images[index]
CTime) < 0) .CTime) < 0)
index = i; index = i;
} }
if (index >= 0) if (index >= 0)
prop = xml.Images[index].CTime; prop = xml.Images[index].CTime;
} }
break; break;
case kpidMTime: case kpidMTime:
if (_xmls.Size() == 1) if (_xmls.Size() == 1)
{ {
const CWimXml &xml = _xmls[0]; const CWimXml &xml = _xmls[0];
int index = -1; int index = -1;
FOR_VECTOR (i, xml.Images) FOR_VECTOR (i, xml.Images)
{ {
const CImageInfo &image = xml.Images[i]; const CImageInfo &image2 = xml.Images[i];
if (image.MTimeDefined) if (image2.MTimeDefined)
if (index < 0 || ::CompareFileTime(&image.MTime, &xml.Images[index]. if (index < 0 || ::CompareFileTime(&image2.MTime, &xml.Images[index]
MTime) > 0) .MTime) > 0)
index = i; index = i;
} }
if (index >= 0) if (index >= 0)
prop = xml.Images[index].MTime; prop = xml.Images[index].MTime;
} }
break; break;
case kpidComment: case kpidComment:
if (image != NULL) if (image)
{ {
if (_xmlInComments) if (_xmlInComments)
{ {
UString s; UString s;
_xmls[0].ToUnicode(s); _xmls[0].ToUnicode(s);
prop = s; prop = s;
} }
else if (image->NameDefined) else if (image->NameDefined)
prop = image->Name; prop = image->Name;
} }
skipping to change at line 387 skipping to change at line 387
prop.filetime.dwHighDateTime = Get32(p + 4); prop.filetime.dwHighDateTime = Get32(p + 4);
} }
static void MethodToProp(int method, int chunksSizeBits, NCOM::CPropVariant &pro p) static void MethodToProp(int method, int chunksSizeBits, NCOM::CPropVariant &pro p)
{ {
if (method >= 0) if (method >= 0)
{ {
char temp[32]; char temp[32];
if ((unsigned)method < ARRAY_SIZE(k_Methods)) if ((unsigned)method < ARRAY_SIZE(k_Methods))
strcpy(temp, k_Methods[method]); strcpy(temp, k_Methods[(unsigned)method]);
else else
ConvertUInt32ToString((unsigned)method, temp); ConvertUInt32ToString((unsigned)method, temp);
if (chunksSizeBits >= 0) if (chunksSizeBits >= 0)
{ {
size_t pos = strlen(temp); size_t pos = strlen(temp);
temp[pos++] = ':'; temp[pos++] = ':';
ConvertUInt32ToString((unsigned)chunksSizeBits, temp + pos); ConvertUInt32ToString((unsigned)chunksSizeBits, temp + pos);
} }
skipping to change at line 473 skipping to change at line 473
} }
break; break;
case kpidShortName: case kpidShortName:
if (item.ImageIndex >= 0 && !item.IsAltStream) if (item.ImageIndex >= 0 && !item.IsAltStream)
_db.GetShortName(realIndex, prop); _db.GetShortName(realIndex, prop);
break; break;
case kpidPackSize: case kpidPackSize:
{ {
UInt64 size = 0;
if (si) if (si)
{ {
if (!si->Resource.IsSolidSmall()) if (!si->Resource.IsSolidSmall())
{ prop = si->Resource.PackSize;
size = si->Resource.PackSize;
prop = size;
}
else else
{ {
if (si->Resource.SolidIndex >= 0) if (si->Resource.SolidIndex >= 0)
{ {
const CSolid &ss = _db.Solids[(unsigned)si->Resource.SolidIndex]; const CSolid &ss = _db.Solids[(unsigned)si->Resource.SolidIndex];
if (ss.FirstSmallStream == item.StreamIndex) if (ss.FirstSmallStream == item.StreamIndex)
prop = _db.DataStreams[ss.StreamIndex].Resource.PackSize; prop = _db.DataStreams[ss.StreamIndex].Resource.PackSize;
} }
} }
} }
else if (!item.IsDir)
prop = (UInt64)0;
break; break;
} }
case kpidSize: case kpidSize:
{ {
UInt64 size = 0;
if (si) if (si)
{ {
if (si->Resource.IsSolid()) if (si->Resource.IsSolid())
{ {
if (si->Resource.IsSolidBig()) if (si->Resource.IsSolidBig())
{ {
if (si->Resource.SolidIndex >= 0) if (si->Resource.SolidIndex >= 0)
{ {
CSolid &ss = _db.Solids[(unsigned)si->Resource.SolidIndex]; const CSolid &ss = _db.Solids[(unsigned)si->Resource.SolidIndex] ;
prop = ss.UnpackSize; prop = ss.UnpackSize;
} }
} }
else else
{ prop = si->Resource.PackSize;
size = si->Resource.PackSize;
prop = size;
}
} }
else else
{ prop = si->Resource.UnpackSize;
size = si->Resource.UnpackSize;
prop = size;
}
} }
else if (!item.IsDir)
prop = (UInt64)0;
break; break;
} }
case kpidIsDir: prop = item.IsDir; break; case kpidIsDir: prop = item.IsDir; break;
case kpidIsAltStream: prop = item.IsAltStream; break; case kpidIsAltStream: prop = item.IsAltStream; break;
case kpidNumAltStreams: case kpidNumAltStreams:
{ {
if (!item.IsAltStream && mainItem->HasMetadata()) if (!item.IsAltStream && mainItem->HasMetadata())
{ {
UInt32 dirRecordSize = _db.IsOldVersion ? kDirRecordSizeOld : kDirReco rdSize; UInt32 dirRecordSize = _db.IsOldVersion ? kDirRecordSizeOld : kDirReco rdSize;
 End of changes. 12 change blocks. 
25 lines changed or deleted 20 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS