It seems user found a bug in FPC 3.2.3 Linux x64 cross compiled to FreeBSD x64. Installed from fpcUpDeluxe.
uses sysutils;
var
s: string;
b: boolean;
begin
s:= ParamStr(1);
if s='' then begin writeln('Param needed, folder path'); exit; end;
b:= DirectoryExists(s);
writeln('DirectoryExists for "'+s+'": '+BoolToStr(b, true));
end.
FreeBSD burzum 13.2-RELEASE-p2 FreeBSD 13.2-RELEASE-p2 #6 releng/13.2-n254627-4341433a673f-dirty: Sat Aug 26 13:30:58 MSK 2023 alex@burzum:/usr/obj/usr/src/amd64.amd64/sys/ALEXS amd64
1) Free Pascal Compiler version 3.2.2 [2023/09/04] for x86_64
$ ./test /usr/home/alex/.config/cudatext/settings/
DirectoryExists for "/usr/home/alex/.config/cudatext/settings/": True
2) Free Pascal Compiler version 3.2.3-767-gf2c446c29b [2023/07/24] for x86_64
Cross compiled on Linux x64 to Freebsd x64
DirectoryExists for "/usr/home/alex/.config/cudatext/settings/": False
I need some confirmation of bug before I make the bugreport.
main branch was not tested yet...