From e3a4324bfa339b04b2b95ba59293d4e11b6f4b59 Mon Sep 17 00:00:00 2001 From: barbeque-squared Date: Sat, 5 Oct 2024 14:40:43 +0200 Subject: [PATCH 1/2] fix special characters in file and folder names --- src/base/UFilesystem.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/UFilesystem.pas b/src/base/UFilesystem.pas index cd625a7db..7b069719d 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 From 31129e50f605ed117b225884e5a442265f9751da Mon Sep 17 00:00:00 2001 From: barbeque-squared Date: Mon, 7 Oct 2024 19:22:58 +0200 Subject: [PATCH 2/2] use ToWide instead of ToNative. can probably be repeated/remove unused stuff later --- src/base/UFilesystem.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/UFilesystem.pas b/src/base/UFilesystem.pas index 7b069719d..bdbc622ef 100644 --- a/src/base/UFilesystem.pas +++ b/src/base/UFilesystem.pas @@ -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;