mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Added missing test
svn path=/trunk/; revision=899
This commit is contained in:
parent
dbd051cad4
commit
a7a23b4dc3
1 changed files with 20 additions and 17 deletions
|
@ -378,13 +378,16 @@ DWORD STDCALL GetFileAttributesW(LPCWSTR lpFileName)
|
|||
NTSTATUS errCode;
|
||||
|
||||
hFile = CreateFileW(lpFileName,
|
||||
FILE_READ_ATTRIBUTES,
|
||||
FILE_READ_ATTRIBUTES,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
errCode = NtQueryInformationFile(hFile,
|
||||
&IoStatusBlock,
|
||||
|
@ -395,7 +398,7 @@ DWORD STDCALL GetFileAttributesW(LPCWSTR lpFileName)
|
|||
{
|
||||
CloseHandle(hFile);
|
||||
SetLastError(RtlNtStatusToDosError(errCode));
|
||||
return 0xFFFFFFFF;
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
return (DWORD)FileBasic.FileAttributes;
|
||||
|
@ -407,14 +410,14 @@ WINBOOL STDCALL SetFileAttributesA(LPCSTR lpFileName,
|
|||
{
|
||||
ULONG i;
|
||||
WCHAR FileNameW[MAX_PATH];
|
||||
i = 0;
|
||||
while ((*lpFileName)!=0 && i < MAX_PATH)
|
||||
{
|
||||
i = 0;
|
||||
while ((*lpFileName)!=0 && i < MAX_PATH)
|
||||
{
|
||||
FileNameW[i] = *lpFileName;
|
||||
lpFileName++;
|
||||
i++;
|
||||
}
|
||||
FileNameW[i] = 0;
|
||||
}
|
||||
FileNameW[i] = 0;
|
||||
return SetFileAttributesW(FileNameW, dwFileAttributes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue