Removed application duplicate directory items file matching in order to support native 8.3 file names

This commit is contained in:
Berserker 2019-05-25 15:53:12 +03:00
parent f62819869e
commit fa991ef152

View File

@ -664,18 +664,16 @@ procedure GetDirectoryListing (const SearchPath, FileMask: WideString; {Un} Excl
var
{O} Items: {O} TList {OF TDirListingItem};
{O} Item: {O} TDirListingItem;
CompiledMask: Utils.TArrayOfByte;
i: integer;
begin
{!} Assert(DirListing <> nil);
Items := DataLib.NewList(Utils.OWNS_ITEMS);
Item := TDirListingItem.Create;
CompiledMask := VfsMatching.CompilePattern(FileMask);
// * * * * * //
with VfsUtils.SysScanDir(SearchPath, FileMask) do begin
while IterNext(Item.Info.FileName, @Item.Info.Base) do begin
if VfsMatching.MatchPattern(Item.Info.FileName, pointer(CompiledMask)) and ((Exclude = nil) or (Exclude[WideStrToCaselessKey(Item.Info.FileName)] = nil)) then begin
if (Exclude = nil) or (Exclude[WideStrToCaselessKey(Item.Info.FileName)] = nil) then begin
Item.SearchName := StrLib.WideLowerCase(Item.Info.FileName);
Items.Add(Item); Item := nil;
Item := TDirListingItem.Create;