mirror of
				https://github.com/winfsp/winfsp.git
				synced 2025-10-30 19:48:38 -05:00 
			
		
		
		
	sys: maintain FO_FILE_MODIFIED bit
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user