Added missing test

svn path=/trunk/; revision=899
This commit is contained in:
Eric Kohl 1999-12-24 17:16:32 +00:00
parent dbd051cad4
commit a7a23b4dc3

View file

@ -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);
}