LCL/ShellListView: Avoid duplicate storage of file size in TShellListItem.FileInfo.Size and in TShellListItem.Data --> make ListItem.Data available for user data.

This commit is contained in:
wp_xyz 2025-11-25 22:22:55 +01:00
parent 59e3b49432
commit b68a60fbf5

View File

@ -1907,9 +1907,7 @@ begin
if not FileItem.IsFolder then
begin
// Second column - Size, but not for folders
// The raw size in bytes is stored in the data part of the item
CurFileSize := FileItem.FFileInfo.Size; // in Bytes. (We already know this, so no need for FileSize(CurFilePath))
NewItem.Data := Pointer(PtrInt(CurFileSize));
NewItem.SubItems.Add(FileSizeToStr(CurFileSize));
// Third column - Type, but not folders
NewItem.SubItems.Add(ExtractFileExt(CurFileName));