mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 00:43:00 -05:00
sys: maintain FO_FILE_MODIFIED bit
This commit is contained in:
parent
9bcd8dcb8e
commit
e0f163e9ba
@ -896,6 +896,9 @@ static NTSTATUS FspFsvolSetAllocationInformation(PFILE_OBJECT FileObject,
|
||||
FspFileNodeSetFileInfo(FileNode, FileObject, &Response->Rsp.SetInformation.FileInfo);
|
||||
FileNode->TruncateOnClose = TRUE;
|
||||
|
||||
/* mark the file object as modified */
|
||||
SetFlag(FileObject->Flags, FO_FILE_MODIFIED);
|
||||
|
||||
FspFileNodeNotifyChange(FileNode, FILE_NOTIFY_CHANGE_SIZE, FILE_ACTION_MODIFIED);
|
||||
}
|
||||
|
||||
@ -996,6 +999,9 @@ static NTSTATUS FspFsvolSetEndOfFileInformation(PFILE_OBJECT FileObject,
|
||||
FspFileNodeSetFileInfo(FileNode, FileObject, &Response->Rsp.SetInformation.FileInfo);
|
||||
FileNode->TruncateOnClose = TRUE;
|
||||
|
||||
/* mark the file object as modified -- FastFat does this only for Allocation though! */
|
||||
SetFlag(FileObject->Flags, FO_FILE_MODIFIED);
|
||||
|
||||
FspFileNodeNotifyChange(FileNode, FILE_NOTIFY_CHANGE_SIZE, FILE_ACTION_MODIFIED);
|
||||
}
|
||||
|
||||
|
@ -229,6 +229,9 @@ static NTSTATUS FspFsvolWriteCached(
|
||||
if (SynchronousIo)
|
||||
FileObject->CurrentByteOffset.QuadPart = WriteEndOffset;
|
||||
|
||||
/* mark the file object as modified (if not paging I/O) */
|
||||
SetFlag(FileObject->Flags, FO_FILE_MODIFIED);
|
||||
|
||||
FspFileNodeRelease(FileNode, Main);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
@ -432,6 +435,10 @@ NTSTATUS FspFsvolWriteComplete(
|
||||
Response->Rsp.Write.FileInfo.FileSize :
|
||||
WriteOffset.QuadPart + Response->IoStatus.Information;
|
||||
|
||||
/* mark the file object as modified (if not paging I/O) */
|
||||
if (!PagingIo)
|
||||
SetFlag(FileObject->Flags, FO_FILE_MODIFIED);
|
||||
|
||||
FspIopResetRequest(Request, 0);
|
||||
}
|
||||
else
|
||||
|
@ -634,7 +634,8 @@ static NTSTATUS Open(FSP_FILE_SYSTEM *FileSystem,
|
||||
* To properly implement this we should maintain some state of whether
|
||||
* we modified the file or not. Alternatively we could have the driver
|
||||
* report to us at Cleanup time whether the file was modified. [The
|
||||
* driver does not currently maintain the FO_FILE_MODIFIED bit however.]
|
||||
* FSD does maintain the FO_FILE_MODIFIED bit, but does not send it
|
||||
* to us.]
|
||||
*
|
||||
* TBD.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user