LCL: FileListBox mask defaults to '*' on windows too, so directories without . in the name can be found too.

git-svn-id: trunk@10795 -
This commit is contained in:
vincents 2007-03-24 22:06:47 +00:00
parent 45a076d5b7
commit f657802132
2 changed files with 7 additions and 10 deletions

View File

@ -157,8 +157,8 @@ Var
begin
if [csloading,csdestroying]*ComponentState<>[] then exit;
Clear;
If SysUtils.FindFirst(FDirectory+DirectorySeparator+GetAllFilesMask,faAnyFile,
Info)=0
If SysUtils.FindFirst(FDirectory+DirectorySeparator+AllDirectoryEntriesMask,
faAnyFile, Info)=0
then
Repeat
if FileInFilenameMasks(Info.Name,Mask) then begin
@ -230,7 +230,7 @@ end;
function TCustomFileListBox.MaskIsStored: boolean;
begin
Result:=(FMask<>GetAllFilesMask);
Result:=(FMask<>AllDirectoryEntriesMask);
end;
procedure TCustomFileListBox.SetDrive(const AValue: Char);
@ -289,7 +289,7 @@ var
begin
inherited Create(TheOwner);
//Initializes the Mask property.
FMask := GetAllFilesMask;
FMask := AllDirectoryEntriesMask;
//Initializes the FileType property.
FFileType := [ftNormal];
//Initializes the Directory and Drive properties to the current directory.

View File

@ -23,12 +23,6 @@ unit FileUtil;
{$mode objfpc}{$H+}
{$IF defined(VER2_0_2) and defined(win32)}
// FPC <= 2.0.2 compatibility code
// WINDOWS define was added after FPC 2.0.2
{$define WINDOWS}
{$endif}
interface
uses
@ -94,6 +88,9 @@ type
);
TSearchFileInPathFlags = set of TSearchFileInPathFlag;
const
AllDirectoryEntriesMask = '*';
function GetAllFilesMask: string;
function GetExeExt: string;
function SearchFileInPath(const Filename, BasePath, SearchPath,