Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/kernelbase/file.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index 18b86820367..91587df64a4 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -2201,6 +2201,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH FlushFileBuffers( HANDLE file ) */ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandle( HANDLE file, BY_HANDLE_FILE_INFORMATION *info ) { + FILE_FS_VOLUME_INFORMATION volume_info; FILE_ALL_INFORMATION all_info; IO_STATUS_BLOCK io; NTSTATUS status; @@ -2209,6 +2210,10 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandle( HANDLE file, BY_HANDLE if (status == STATUS_BUFFER_OVERFLOW) status = STATUS_SUCCESS; if (!set_ntstatus( status )) return FALSE;
+ status = NtQueryVolumeInformationFile( file, &io, &volume_info, sizeof(volume_info), FileFsVolumeInformation ); + if (status == STATUS_BUFFER_OVERFLOW) status = STATUS_SUCCESS; + if (!set_ntstatus( status )) return FALSE; + info->dwFileAttributes = all_info.BasicInformation.FileAttributes; info->ftCreationTime.dwHighDateTime = all_info.BasicInformation.CreationTime.u.HighPart; info->ftCreationTime.dwLowDateTime = all_info.BasicInformation.CreationTime.u.LowPart; @@ -2216,7 +2221,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandle( HANDLE file, BY_HANDLE info->ftLastAccessTime.dwLowDateTime = all_info.BasicInformation.LastAccessTime.u.LowPart; info->ftLastWriteTime.dwHighDateTime = all_info.BasicInformation.LastWriteTime.u.HighPart; info->ftLastWriteTime.dwLowDateTime = all_info.BasicInformation.LastWriteTime.u.LowPart; - info->dwVolumeSerialNumber = 0; /* FIXME */ + info->dwVolumeSerialNumber = volume_info.VolumeSerialNumber; info->nFileSizeHigh = all_info.StandardInformation.EndOfFile.u.HighPart; info->nFileSizeLow = all_info.StandardInformation.EndOfFile.u.LowPart; info->nNumberOfLinks = all_info.StandardInformation.NumberOfLinks;