mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 11:30:35 +02:00
* case insensitve directory search support
git-svn-id: trunk@5104 -
This commit is contained in:
parent
9f5d69ce31
commit
7e8074463c
@ -148,7 +148,12 @@ implementation
|
|||||||
if ((dir.attr and faDirectory)<>faDirectory) or
|
if ((dir.attr and faDirectory)<>faDirectory) or
|
||||||
(dir.Name<>'.') or
|
(dir.Name<>'.') or
|
||||||
(dir.Name<>'..') then
|
(dir.Name<>'..') then
|
||||||
|
begin
|
||||||
|
if not(tf_files_case_sensitive in source_info.flags) then
|
||||||
|
DirectoryEntries.Add(Lower(Dir.Name),Pointer(Dir.Attr))
|
||||||
|
else
|
||||||
DirectoryEntries.Add(Dir.Name,Pointer(Dir.Attr));
|
DirectoryEntries.Add(Dir.Name,Pointer(Dir.Attr));
|
||||||
|
end;
|
||||||
until findnext(dir) <> 0;
|
until findnext(dir) <> 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -158,6 +163,9 @@ implementation
|
|||||||
var
|
var
|
||||||
Attr : Longint;
|
Attr : Longint;
|
||||||
begin
|
begin
|
||||||
|
if not(tf_files_case_sensitive in source_info.flags) then
|
||||||
|
Attr:=PtrInt(DirectoryEntries.Find(Lower(AName)))
|
||||||
|
else
|
||||||
Attr:=PtrInt(DirectoryEntries.Find(AName));
|
Attr:=PtrInt(DirectoryEntries.Find(AName));
|
||||||
if Attr<>0 then
|
if Attr<>0 then
|
||||||
Result:=((Attr and faDirectory)=0)
|
Result:=((Attr and faDirectory)=0)
|
||||||
@ -170,6 +178,9 @@ implementation
|
|||||||
var
|
var
|
||||||
Attr : Longint;
|
Attr : Longint;
|
||||||
begin
|
begin
|
||||||
|
if not(tf_files_case_sensitive in source_info.flags) then
|
||||||
|
Attr:=PtrInt(DirectoryEntries.Find(Lower(AName)))
|
||||||
|
else
|
||||||
Attr:=PtrInt(DirectoryEntries.Find(AName));
|
Attr:=PtrInt(DirectoryEntries.Find(AName));
|
||||||
if Attr<>0 then
|
if Attr<>0 then
|
||||||
Result:=((Attr and faDirectory)=faDirectory)
|
Result:=((Attr and faDirectory)=faDirectory)
|
||||||
|
Loading…
Reference in New Issue
Block a user