merged non-sparse file_size bug on windows from RC_0_16

This commit is contained in:
Arvid Norberg 2013-11-20 08:06:33 +00:00
parent d736b158a0
commit c384bd5c92
2 changed files with 6 additions and 2 deletions

View File

@ -25,6 +25,7 @@
* fix uTP edge case where udp socket buffer fills up * fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP * fix nagle implementation in uTP
* fix bug in non-sparse mode on windows, causing incorrect file errors to be generated
* fix set_name() on file_storage actually affecting save paths * fix set_name() on file_storage actually affecting save paths
* fix large file support issue on mingw * fix large file support issue on mingw
* add some error handling to set_piece_hashes() * add some error handling to set_piece_hashes()

View File

@ -2050,8 +2050,11 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER {
DWORD high_dword = 0; DWORD high_dword = 0;
offs.LowPart = GetCompressedFileSize_(m_path.c_str(), &high_dword); offs.LowPart = GetCompressedFileSize_(m_path.c_str(), &high_dword);
offs.HighPart = high_dword; offs.HighPart = high_dword;
ec.assign(GetLastError(), get_system_category()); if (offs.LowPart == INVALID_FILE_SIZE)
if (ec) return false; {
ec.assign(GetLastError(), get_system_category());
if (ec) return false;
}
if (offs.QuadPart != s) if (offs.QuadPart != s)
{ {
// if the user has permissions, avoid filling // if the user has permissions, avoid filling