frostalf / libtorrent

Automatically exported from code.google.com/p/libtorrent
0 stars 0 forks source link

False sparse flag removal #619

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Using sparse allocating mode.
Try start download any file and immediately stop download ( Only one block 
should be written to disk).

What is the expected output? What do you see instead?
libtorrent trying to remove sparse flag (which cause increasing physical file 
allocation and time consumtion in DeviceIoControl(... FSCTL_SET_SPARSE). Sparse 
flag must be removed only if file fully allocated on disk.

What version of the product are you using? On what operating system?
trunk. Windows.

Please provide any additional information below.
attachment contains fix

Original issue reported on code.google.com by ajax16...@gmail.com on 10 May 2014 at 10:09