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

@@ -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