On 18/09/2019 23.23, Bart via lazarus wrote:
On Wed, Sep 18, 2019 at 9:01 PM Torsten Bonde Christiansen via lazarus
<[email protected]> wrote:

Is it a bug that FileExistsUTF8(...) reports true/false differently for
folders in Unix and Windows.
Thet are just wrappers for fpc's FileExists() nowadays.


No entirely though. The Unix version is mostly a wrapper, yes - but the Windows version do some additional filtering:

function FileExistsUTF8(const Filename: string): boolean;
var
  Attr: Longint;
begin
  Attr := FileGetAttrUTF8(FileName);
  if Attr <> -1 then
    Result:= (Attr and FILE_ATTRIBUTE_DIRECTORY) = 0
  else
    Result:=False;
end;

Hence my question....

-Torsten.


--
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to