mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 02:59:15 +02:00
lazutils: simplified
git-svn-id: branches/fixes_1_6@53411 -
This commit is contained in:
parent
d41ab3e619
commit
6b5cd40de6
@ -958,17 +958,16 @@ begin
|
|||||||
if (FileInfo.Name='.') or (FileInfo.Name='..') or (FileInfo.Name='')
|
if (FileInfo.Name='.') or (FileInfo.Name='..') or (FileInfo.Name='')
|
||||||
then
|
then
|
||||||
continue;
|
continue;
|
||||||
if LazFileUtils.CompareFilenamesIgnoreCase(FileInfo.Name,ShortFilename)=0 then begin
|
if LazFileUtils.CompareFilenamesIgnoreCase(FileInfo.Name,ShortFilename)<>0 then
|
||||||
if FileInfo.Name=ShortFilename then begin
|
continue;
|
||||||
// fits exactly
|
if FileInfo.Name=ShortFilename then begin
|
||||||
//Don't return (unaltered) Filename: otherwise possible changes by ResolveDots get lost
|
// fits exactly
|
||||||
Result:=CurDir+FileInfo.Name;
|
//Don't return (unaltered) Filename: otherwise possible changes by ResolveDots get lost
|
||||||
break;
|
|
||||||
end;
|
|
||||||
// fits case insensitive
|
|
||||||
Result:=CurDir+FileInfo.Name;
|
Result:=CurDir+FileInfo.Name;
|
||||||
// search further
|
break;
|
||||||
end;
|
end;
|
||||||
|
// fits case insensitive
|
||||||
|
Result:=CurDir+FileInfo.Name;
|
||||||
until LazFileUtils.FindNextUTF8(FileInfo)<>0;
|
until LazFileUtils.FindNextUTF8(FileInfo)<>0;
|
||||||
end;
|
end;
|
||||||
LazFileUtils.FindCloseUTF8(FileInfo);
|
LazFileUtils.FindCloseUTF8(FileInfo);
|
||||||
|
Loading…
Reference in New Issue
Block a user