merged non-sparse file_size bug on windows from RC_0_16
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
* fix uTP edge case where udp socket buffer fills up
|
||||
* 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 large file support issue on mingw
|
||||
* add some error handling to set_piece_hashes()
|
||||
|
@@ -2050,8 +2050,11 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER {
|
||||
DWORD high_dword = 0;
|
||||
offs.LowPart = GetCompressedFileSize_(m_path.c_str(), &high_dword);
|
||||
offs.HighPart = high_dword;
|
||||
ec.assign(GetLastError(), get_system_category());
|
||||
if (ec) return false;
|
||||
if (offs.LowPart == INVALID_FILE_SIZE)
|
||||
{
|
||||
ec.assign(GetLastError(), get_system_category());
|
||||
if (ec) return false;
|
||||
}
|
||||
if (offs.QuadPart != s)
|
||||
{
|
||||
// if the user has permissions, avoid filling
|
||||
|
Reference in New Issue
Block a user