FIX: Folder size within disk images not shown (fixes #1219)

(cherry picked from commit 16e028c05f)
This commit is contained in:
Alexander Koblov 2023-08-12 14:12:52 +03:00
commit e94ffc6a4e

View file

@ -280,11 +280,9 @@ begin
with Result do
begin
{
Comment,
}
SizeProperty := TFileSizeProperty.Create(ArchiveItem.UnpSize);
SizeProperty.IsValid := (ArchiveItem.UnpSize >= 0);
CompressedSizeProperty := TFileCompressedSizeProperty.Create(ArchiveItem.PackSize);
CompressedSizeProperty.IsValid := (ArchiveItem.PackSize >= 0);
@ -292,8 +290,23 @@ begin
AttributesProperty := TUnixFileAttributesProperty.Create(ArchiveItem.Attributes)
else if (FormMode and MAF_WIN_ATTR) <> 0 then
AttributesProperty := TNtfsFileAttributesProperty.Create(ArchiveItem.Attributes)
else
else begin
AttributesProperty := TFileAttributesProperty.CreateOSAttributes(ArchiveItem.Attributes);
end;
if AttributesProperty.IsDirectory then
begin
if not SizeProperty.IsValid then
begin
SizeProperty.IsValid := True;
SizeProperty.Value := FOLDER_SIZE_UNKN;
end;
if not CompressedSizeProperty.IsValid then
begin
CompressedSizeProperty.IsValid := True;
CompressedSizeProperty.Value := FOLDER_SIZE_UNKN;
end;
end;
ModificationTimeProperty := TFileModificationDateTimeProperty.Create(0);
try