From 5dffa959e50108f911f63e527f6a1a6468b8c509 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 15 Apr 2008 15:34:14 +0000 Subject: [PATCH] take more things from filelistbox patch of Bart Broersma (issue #0010985) git-svn-id: trunk@14831 - --- lcl/filectrl.pp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lcl/filectrl.pp b/lcl/filectrl.pp index 7a192b049d..9f23ffd4a4 100644 --- a/lcl/filectrl.pp +++ b/lcl/filectrl.pp @@ -140,6 +140,13 @@ implementation { TCustomFileListBox } procedure TCustomFileListBox.UpdateFileList; +const + AttrNotNormal = faReadOnly or + faHidden or + faSysFile or + faVolumeID or + faDirectory or + faArchive; var Info: TSearchRec; @@ -176,10 +183,13 @@ begin repeat if MatchesMaskList(Info.Name,Mask) then begin - if (Info.Attr and faDirectory) > 0 then - Items.Add('['+Info.Name+']') - else - Items.Add(Info.Name); + if (ftNormal in FileType) or ((Info.Attr and AttrNotNormal) > 0) then + begin + if (Info.Attr and faDirectory) > 0 then + Items.Add('['+Info.Name+']') + else + Items.Add(Info.Name); + end; end; until SysUtils.FindNext(Info) <> 0; SysUtils.FindClose(Info);