Peter Oberndorfer : ntdll:
Call NtQueryAttributesFile in RtlDoesFileExists_U.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri May 4 07:11:09 CDT 2007
Module: wine
Branch: master
Commit: 3d57dd3f075b0c92e1c42ba9862cfdbe279d5c90
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3d57dd3f075b0c92e1c42ba9862cfdbe279d5c90
Author: Peter Oberndorfer <kumbayo84 at arcor.de>
Date: Thu May 3 22:33:58 2007 +0200
ntdll: Call NtQueryAttributesFile in RtlDoesFileExists_U.
---
dlls/ntdll/directory.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 7045716..64d5ba9 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -2013,12 +2013,21 @@ done:
BOOLEAN WINAPI RtlDoesFileExists_U(LPCWSTR file_name)
{
UNICODE_STRING nt_name;
- ANSI_STRING unix_name;
+ FILE_BASIC_INFORMATION basic_info;
+ OBJECT_ATTRIBUTES attr;
BOOLEAN ret;
if (!RtlDosPathNameToNtPathName_U( file_name, &nt_name, NULL, NULL )) return FALSE;
- ret = (wine_nt_to_unix_file_name( &nt_name, &unix_name, FILE_OPEN, FALSE ) == STATUS_SUCCESS);
- if (ret) RtlFreeAnsiString( &unix_name );
+
+ attr.Length = sizeof(attr);
+ attr.RootDirectory = 0;
+ attr.ObjectName = &nt_name;
+ attr.Attributes = OBJ_CASE_INSENSITIVE;
+ attr.SecurityDescriptor = NULL;
+ attr.SecurityQualityOfService = NULL;
+
+ ret = NtQueryAttributesFile(&attr, &basic_info) == STATUS_SUCCESS;
+
RtlFreeUnicodeString( &nt_name );
return ret;
}
More information about the wine-cvs
mailing list