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))) {