mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 03:19:32 +02:00
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:
parent
45a076d5b7
commit
f657802132
@ -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.
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user