mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
Merge pull request #107 from saibotu/pr-writesize
Don't decrease FileSize on write
This commit is contained in:
commit
18bf6ca666
@ -56,4 +56,5 @@ CONTRIBUTOR LIST
|
||||
|===
|
||||
|Bill Zissimopoulos |billziss at navimatics.com
|
||||
|Sam Kelly (DuroSoft Technologies LLC, https://durosoft.com) |sam at durosoft.com
|
||||
|Tobias Urlaub |saibotu at outlook.de
|
||||
|===
|
||||
|
@ -1148,6 +1148,7 @@ static NTSTATUS fsp_fuse_intf_Write(FSP_FILE_SYSTEM *FileSystem,
|
||||
|
||||
AllocationUnit = (UINT64)f->VolumeParams.SectorSize *
|
||||
(UINT64)f->VolumeParams.SectorsPerAllocationUnit;
|
||||
if (Offset + bytes > FileInfoBuf.FileSize)
|
||||
FileInfoBuf.FileSize = Offset + bytes;
|
||||
FileInfoBuf.AllocationSize =
|
||||
(FileInfoBuf.FileSize + AllocationUnit - 1) / AllocationUnit * AllocationUnit;
|
||||
|
Loading…
x
Reference in New Issue
Block a user