fix UTF8 file scan

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2539 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2012-09-25 09:32:05 +00:00
parent d433a47a64
commit 5fa7b35965

View File

@@ -79,7 +79,7 @@ type
end; end;
implementation implementation
uses {RxStrUtils, }strutils, RxAppUtils; uses FileUtil, strutils, RxAppUtils, LazUTF8;
function MenuItemStr(S:string):string; function MenuItemStr(S:string):string;
var var
@@ -139,7 +139,7 @@ begin
AFileList:=TStringList.Create; AFileList:=TStringList.Create;
AFolderList.Sorted:=true; AFolderList.Sorted:=true;
try try
R:=FindFirst(S+AllMask,faAnyFile, Rec); R:=FindFirstUTF8(S+AllMask,faAnyFile, Rec);
while R=0 do while R=0 do
begin begin
if ((Rec.Attr and faDirectory) <>0) and (Rec.Name<>'.') and (Rec.Name<>'..') then if ((Rec.Attr and faDirectory) <>0) and (Rec.Name<>'.') and (Rec.Name<>'..') then
@@ -149,9 +149,9 @@ begin
if AnsiLowerCase(ExtractFileExt(Rec.Name))=AnsiLowerCase(FDefaultExt) then if AnsiLowerCase(ExtractFileExt(Rec.Name))=AnsiLowerCase(FDefaultExt) then
AFileList.Add(S+Rec.Name); AFileList.Add(S+Rec.Name);
end; end;
R:=FindNext(Rec); R:=FindNextUTF8(Rec);
end; end;
FindClose(Rec); FindCloseUTF8(Rec);
CreateSubItems; CreateSubItems;
CreateItems; CreateItems;
finally finally