mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +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;
|
NTSTATUS errCode;
|
||||||
|
|
||||||
hFile = CreateFileW(lpFileName,
|
hFile = CreateFileW(lpFileName,
|
||||||
FILE_READ_ATTRIBUTES,
|
FILE_READ_ATTRIBUTES,
|
||||||
FILE_SHARE_READ,
|
FILE_SHARE_READ,
|
||||||
NULL,
|
NULL,
|
||||||
OPEN_EXISTING,
|
OPEN_EXISTING,
|
||||||
FILE_ATTRIBUTE_NORMAL,
|
FILE_ATTRIBUTE_NORMAL,
|
||||||
NULL);
|
NULL);
|
||||||
|
if (hFile == INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
return 0xFFFFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
errCode = NtQueryInformationFile(hFile,
|
errCode = NtQueryInformationFile(hFile,
|
||||||
&IoStatusBlock,
|
&IoStatusBlock,
|
||||||
|
@ -395,7 +398,7 @@ DWORD STDCALL GetFileAttributesW(LPCWSTR lpFileName)
|
||||||
{
|
{
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
SetLastError(RtlNtStatusToDosError(errCode));
|
SetLastError(RtlNtStatusToDosError(errCode));
|
||||||
return 0xFFFFFFFF;
|
return 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
return (DWORD)FileBasic.FileAttributes;
|
return (DWORD)FileBasic.FileAttributes;
|
||||||
|
@ -407,14 +410,14 @@ WINBOOL STDCALL SetFileAttributesA(LPCSTR lpFileName,
|
||||||
{
|
{
|
||||||
ULONG i;
|
ULONG i;
|
||||||
WCHAR FileNameW[MAX_PATH];
|
WCHAR FileNameW[MAX_PATH];
|
||||||
i = 0;
|
i = 0;
|
||||||
while ((*lpFileName)!=0 && i < MAX_PATH)
|
while ((*lpFileName)!=0 && i < MAX_PATH)
|
||||||
{
|
{
|
||||||
FileNameW[i] = *lpFileName;
|
FileNameW[i] = *lpFileName;
|
||||||
lpFileName++;
|
lpFileName++;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
FileNameW[i] = 0;
|
FileNameW[i] = 0;
|
||||||
return SetFileAttributesW(FileNameW, dwFileAttributes);
|
return SetFileAttributesW(FileNameW, dwFileAttributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue