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:
parent
15b6bc6135
commit
d4fc2fd746
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue