aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--unicode/src/lib/TntUnicodeControls/TntSysUtils.pas15
1 files changed, 4 insertions, 11 deletions
diff --git a/unicode/src/lib/TntUnicodeControls/TntSysUtils.pas b/unicode/src/lib/TntUnicodeControls/TntSysUtils.pas
index 17084f35..0b0f5c5e 100644
--- a/unicode/src/lib/TntUnicodeControls/TntSysUtils.pas
+++ b/unicode/src/lib/TntUnicodeControls/TntSysUtils.pas
@@ -1041,22 +1041,15 @@ var
Code: Cardinal;
begin
Code := WideFileGetAttr(Name);
- Result := (Code <> INVALID_FILE_ATTRIBUTES) and (FILE_ATTRIBUTE_DIRECTORY and Code <> 0);
+ Result := (Code <> INVALID_FILE_ATTRIBUTES) and ((FILE_ATTRIBUTE_DIRECTORY and Code) <> 0);
end;
function WideFileExists(const Name: WideString): Boolean;
var
- Handle: THandle;
- FindData: TWin32FindDataW;
+ Code: Cardinal;
begin
- Result := False;
- Handle := Tnt_FindFirstFileW(PWideChar(Name), FindData);
- if Handle <> INVALID_HANDLE_VALUE then
- begin
- Windows.FindClose(Handle);
- if (FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = 0 then
- Result := True;
- end;
+ Code := WideFileGetAttr(Name);
+ Result := (Code <> INVALID_FILE_ATTRIBUTES) and ((FILE_ATTRIBUTE_DIRECTORY and Code) = 0);
end;
function WideFileGetAttr(const FileName: WideString): Cardinal;