kernel32: Also accept STATUS_BUFFER_OVERFLOW as a valid return code in GetFileInformationByHandle().

FileAllInformation is supposed to also return the file name. If it did,
"all_info" would be too small for the returned data, but since it would still
return as much information as fits in the buffer, we don't need a larger
buffer either.
This commit is contained in:
Henri Verbeet 2009-11-19 11:41:26 +01:00 committed by Alexandre Julliard
parent 15b6bc6135
commit d4fc2fd746
1 changed files with 1 additions and 0 deletions

View File

@ -821,6 +821,7 @@ BOOL WINAPI GetFileInformationByHandle( HANDLE hFile, BY_HANDLE_FILE_INFORMATION
NTSTATUS status;
status = NtQueryInformationFile( hFile, &io, &all_info, sizeof(all_info), FileAllInformation );
if (status == STATUS_BUFFER_OVERFLOW) status = STATUS_SUCCESS;
if (status == STATUS_SUCCESS)
{
info->dwFileAttributes = all_info.BasicInformation.FileAttributes;