From 1e8b391f35912ad2e6b0f2e175ca7fdd472d9036 Mon Sep 17 00:00:00 2001 From: bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Sun, 1 Sep 2019 13:32:06 +0000 Subject: [PATCH] TShellListView: don't ask the system again for filesize since we already stored it somewhere. git-svn-id: trunk@61796 - --- lcl/shellctrls.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcl/shellctrls.pas b/lcl/shellctrls.pas index 860eee8189..6c57697dbd 100644 --- a/lcl/shellctrls.pas +++ b/lcl/shellctrls.pas @@ -1432,7 +1432,7 @@ begin NewItem.Caption := CurFileName; // Second column - Size // The raw size in bytes is stored in the data part of the item - CurFileSize := FileSize(CurFilePath); // in Bytes + CurFileSize := TFileItem(Files.Objects[i]).FFileInfo.Size; // in Bytes. (We already know this, so no need for FileSize(CurFilePath)) NewItem.Data := Pointer(PtrInt(CurFileSize)); if CurFileSize < 1024 then NewItem.SubItems.Add(Format(sShellCtrlsBytes, [IntToStr(CurFileSize)]))