diff --git a/src/base/UFilesystem.pas b/src/base/UFilesystem.pas index cd625a7db..bdbc622ef 100644 --- a/src/base/UFilesystem.pas +++ b/src/base/UFilesystem.pas @@ -42,7 +42,7 @@ interface UPath; type - TSytemSearchRec = TSearchRec; + TSytemSearchRec = TUnicodeSearchRec; TFileInfo = record Time: integer; // timestamp @@ -439,7 +439,7 @@ function TFileSystemImpl.ExcludeTrailingPathDelimiter(const FileName: IPath): IP function TFileSystemImpl.FindFirst(const FilePattern: IPath; Attr: integer; var F: TSytemSearchRec): integer; begin - Result := SysUtils.FindFirst(FilePattern.ToNative(), Attr, F); + Result := SysUtils.FindFirst(FilePattern.ToWide(), Attr, F); end; function TFileSystemImpl.FindNext(var F: TSytemSearchRec): integer;