merged sparse file fix from RC_0_16

This commit is contained in:
Arvid Norberg 2014-05-10 23:38:54 +00:00
parent aef1335e76
commit 870073345b
2 changed files with 7 additions and 2 deletions

View File

@ -50,6 +50,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* fixed sparse file detection on windows
* fixed bug in gunzip
* fix to use proxy settings when adding .torrent file from URL
* fix resume file issue related to daylight savings time on windows

View File

@ -1317,8 +1317,12 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER {
return true;
}
// if we only have a single range in the file, we're not sparse
return returned_bytes != sizeof(FILE_ALLOCATED_RANGE_BUFFER);
// if we have more than one range in the file, we're sparse
if (returned_bytes != sizeof(FILE_ALLOCATED_RANGE_BUFFER)) {
return true;
}
return (in.Length.QuadPart != out[0].Length.QuadPart);
}
#endif