lazutils: simplified

git-svn-id: branches/fixes_1_6@53411 -
This commit is contained in:
mattias 2016-11-21 16:21:18 +00:00
parent d41ab3e619
commit 6b5cd40de6

View File

@ -958,7 +958,8 @@ 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
continue;
if FileInfo.Name=ShortFilename then begin if FileInfo.Name=ShortFilename then begin
// fits exactly // fits exactly
//Don't return (unaltered) Filename: otherwise possible changes by ResolveDots get lost //Don't return (unaltered) Filename: otherwise possible changes by ResolveDots get lost
@ -967,8 +968,6 @@ begin
end; end;
// fits case insensitive // fits case insensitive
Result:=CurDir+FileInfo.Name; Result:=CurDir+FileInfo.Name;
// search further
end;
until LazFileUtils.FindNextUTF8(FileInfo)<>0; until LazFileUtils.FindNextUTF8(FileInfo)<>0;
end; end;
LazFileUtils.FindCloseUTF8(FileInfo); LazFileUtils.FindCloseUTF8(FileInfo);