@liewald
Please do the following:
1. Open filectrl.pp, it's located in: $(LazarusDir)/LCL/
2. Go to the bottom part of procedure UpdateFileList(Line: 342)
3. Add the following line:
//....
begin
if [csloading, csdestroying] * ComponentState <> [] then
Exit;
Clear;
if FileType <> [] then
begin
if FindFirstUTF8(
IncludeTrailingPathDelimiter(FDirectory)+AllDirectoryEntriesMask,
FileTypeToFileAttribute(FileType), Info) = 0
then
repeat
if MatchesMaskList(Info.Name,Mask) then
begin
if (ftNormal in FileType) or ((Info.Attr and AttrNotNormal) > 0) then
begin
if (Info.Attr and faDirectory) > 0 then
Items.Add('['+Info.Name+']')
else
if FileType <> [ftDirectory] then //<--add this line(meaning: only add files to list, if the set strictly differs from ftDirectory, empty sets are checked above)
Items.Add(Info.Name);
end;
end;
until FindNextUTF8(Info) <> 0;
FindCloseUTF8(Info);
end;
UpdateSelectedFileName;
end;
4. Rebuild the IDE
PS: This is just a quick fix, I did not test all the possible scenarios. You should fill in a bugreport.