Skip to content

Commit

Permalink
Bug 1649: Prevent stall on startup when resolving icons of common fil…
Browse files Browse the repository at this point in the history
…e types takes too long

https://winscp.net/tracker/1649

Source commit: 7327c862de59bc1502af852e97714210193d7261
  • Loading branch information
martinprikryl committed May 23, 2018
1 parent 32e89d3 commit db25ff2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/packages/filemng/CustomDirView.pas
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ function OverlayImageList(Size: Integer): TImageList;
implementation

uses
Math, DirViewColProperties, UITypes, Types;
Math, DirViewColProperties, UITypes, Types, OperationWithTimeout;

const
Space = ' ';
Expand Down Expand Up @@ -710,7 +710,7 @@ function GetIconIndex(const AFile: string; Attrs: DWORD; Flags: UINT): Integer;
function GetshFileInfo(const AFile: string; Attrs: DWORD; Flags: UINT): TSHFileInfo;
begin
try
SHGetFileInfo(PChar(AFile), Attrs, Result, SizeOf(TSHFileInfo), Flags);
SHGetFileInfoWithTimeout(PChar(AFile), Attrs, Result, SizeOf(TSHFileInfo), Flags, 1000);
except
FillChar(Result, SizeOf(Result), 0);
end;
Expand Down

0 comments on commit db25ff2

Please sign in to comment.