From 77624f187f26c7b91c2fb5784ef92ce24393e211 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Mon, 8 Aug 2016 12:44:15 +0000 Subject: [PATCH] [FASTFAT] Fix a FIXME: update the last writing date in case of null-length write. svn path=/trunk/; revision=72157 --- reactos/drivers/filesystems/fastfat/rw.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/reactos/drivers/filesystems/fastfat/rw.c b/reactos/drivers/filesystems/fastfat/rw.c index 8dbad17f0f5..9a554f19f4d 100644 --- a/reactos/drivers/filesystems/fastfat/rw.c +++ b/reactos/drivers/filesystems/fastfat/rw.c @@ -843,12 +843,14 @@ VfatWrite( } } + OldFileSize = Fcb->RFCB.FileSize; + if (Length == 0) { - /* FIXME: Update last write time */ + /* Update last write time */ IrpContext->Irp->IoStatus.Information = 0; Status = STATUS_SUCCESS; - goto ByeBye; + goto Metadata; } if (IrpContext->Irp->Flags & IRP_PAGING_IO) @@ -918,8 +920,6 @@ VfatWrite( } } - OldFileSize = Fcb->RFCB.FileSize; - Buffer = VfatGetUserBuffer(IrpContext->Irp, BooleanFlagOn(IrpContext->Irp->Flags, IRP_PAGING_IO)); Status = VfatLockUserBuffer(IrpContext->Irp, Length, IoReadAccess); if (!NT_SUCCESS(Status)) @@ -1000,6 +1000,7 @@ VfatWrite( } } +Metadata: if (!(IrpContext->Irp->Flags & IRP_PAGING_IO) && !(Fcb->Flags & (FCB_IS_FAT|FCB_IS_VOLUME))) {