mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 09:22:57 -05:00
sys: IRP_MJ_QUERY_VOLUME_INFORMATION: FileFsDeviceInformation: always return FILE_DEVICE_DISK to avoid problem with GetFileType failures
This commit is contained in:
@ -117,7 +117,15 @@ static NTSTATUS FspFsvolQueryFsDeviceInformation(
|
||||
|
||||
PFILE_FS_DEVICE_INFORMATION Info = (PFILE_FS_DEVICE_INFORMATION)*PBuffer;
|
||||
|
||||
Info->DeviceType = FsvolDeviceObject->DeviceType;
|
||||
/*
|
||||
* The following value MUST be FILE_DEVICE_DISK or GetFileType fails,
|
||||
* which has all sorts of interesting consequences (like cmd.exe failing
|
||||
* to redirect to a file when under a network file system).
|
||||
*
|
||||
* See also (which explicitly says to use FILE_DEVICE_DISK for our case):
|
||||
* https://msdn.microsoft.com/en-us/library/cc232109.aspx
|
||||
*/
|
||||
Info->DeviceType = FILE_DEVICE_DISK;
|
||||
Info->Characteristics = FsvolDeviceObject->Characteristics;
|
||||
|
||||
*PBuffer += sizeof(FILE_FS_DEVICE_INFORMATION);
|
||||
|
Reference in New Issue
Block a user