mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
Fixed a bug in VfatWriteFile().
For partitions with clusters < 4k, there was calculated the wrong start cluster. svn path=/trunk/; revision=2163
This commit is contained in:
parent
65d55d8863
commit
0af72b1ead
1 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
/* $Id: rw.c,v 1.28 2001/08/05 16:35:52 hbirr Exp $
|
/* $Id: rw.c,v 1.29 2001/08/07 15:38:04 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -835,8 +835,11 @@ VfatWriteFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
||||||
}
|
}
|
||||||
FirstCluster = CurrentCluster;
|
FirstCluster = CurrentCluster;
|
||||||
}
|
}
|
||||||
Status = OffsetToCluster(DeviceExt, FirstCluster, WriteOffset,
|
Status = OffsetToCluster(DeviceExt,
|
||||||
&CurrentCluster, TRUE);
|
FirstCluster,
|
||||||
|
ROUND_DOWN(WriteOffset, ChunkSize),
|
||||||
|
&CurrentCluster,
|
||||||
|
TRUE);
|
||||||
|
|
||||||
if (WriteOffset + Length > Fcb->entry.FileSize &&
|
if (WriteOffset + Length > Fcb->entry.FileSize &&
|
||||||
!(Fcb->entry.Attrib & FILE_ATTRIBUTE_DIRECTORY))
|
!(Fcb->entry.Attrib & FILE_ATTRIBUTE_DIRECTORY))
|
||||||
|
|
Loading…
Reference in a new issue