Merge branch 'pvt-tsfix'

This commit is contained in:
Bill Zissimopoulos 2021-04-08 14:06:52 -07:00
commit d4a70da611
No known key found for this signature in database
GPG Key ID: 3D4F95D52C7B3EA3

View File

@ -1288,10 +1288,31 @@ static NTSTATUS FspFsvolSetBasicInformation(PFILE_OBJECT FileObject,
} }
Request->Req.SetInformation.Info.Basic.FileAttributes = FileAttributes; Request->Req.SetInformation.Info.Basic.FileAttributes = FileAttributes;
Request->Req.SetInformation.Info.Basic.CreationTime = Info->CreationTime.QuadPart;
Request->Req.SetInformation.Info.Basic.LastAccessTime = Info->LastAccessTime.QuadPart; /*
Request->Req.SetInformation.Info.Basic.LastWriteTime = Info->LastWriteTime.QuadPart; * From FILE_BASIC_INFORMATION (https://tinyurl.com/hwex4bd9):
Request->Req.SetInformation.Info.Basic.ChangeTime = Info->ChangeTime.QuadPart; *
* The file system updates the values of the LastAccessTime,
* LastWriteTime, and ChangeTime members as appropriate after an I/O
* operation is performed on a file. A driver or application can
* request that the file system not update one or more of these
* members for I/O operations that are performed on the caller's file
* handle by setting the appropriate members to -1. The caller can set
* one, all, or any other combination of these three members to -1.
* Only the members that are set to -1 will be unaffected by I/O
* operations on the file handle; the other members will be updated as
* appropriate.
*
* GitHub issue #362
*/
Request->Req.SetInformation.Info.Basic.CreationTime =
-1 != Info->CreationTime.QuadPart ? Info->CreationTime.QuadPart : 0;
Request->Req.SetInformation.Info.Basic.LastAccessTime =
-1 != Info->LastAccessTime.QuadPart ? Info->LastAccessTime.QuadPart : 0;
Request->Req.SetInformation.Info.Basic.LastWriteTime =
-1 != Info->LastWriteTime.QuadPart ? Info->LastWriteTime.QuadPart : 0;
Request->Req.SetInformation.Info.Basic.ChangeTime =
-1 != Info->ChangeTime.QuadPart ? Info->ChangeTime.QuadPart : 0;
} }
else else
{ {