forked from premiere/premiere-libtorrent
storage compact mode resume data fix
This commit is contained in:
parent
91ba36a396
commit
3499913c59
|
@ -587,7 +587,7 @@ namespace libtorrent
|
|||
|
||||
LARGE_INTEGER offs;
|
||||
offs.QuadPart = file_offset;
|
||||
if (SetFilePointerEx(m_file_handle, offs, &offs, SEEK_SET) == FALSE)
|
||||
if (SetFilePointerEx(m_file_handle, offs, &offs, FILE_BEGIN) == FALSE)
|
||||
{
|
||||
ec = error_code(GetLastError(), get_system_category());
|
||||
return -1;
|
||||
|
|
|
@ -273,7 +273,7 @@ namespace libtorrent
|
|||
// in sparse mode, allow the files to be more recent
|
||||
// than the resume data, but only by 5 minutes
|
||||
if ((compact_mode && (time > s->second + 1 || time < s->second - 1)) ||
|
||||
(!compact_mode && (time > s->second + 5 * 60) || time < s->second - 1))
|
||||
(!compact_mode && (time > s->second + 5 * 60 || time < s->second - 1)))
|
||||
{
|
||||
if (error) *error = "timestamp mismatch for file '"
|
||||
+ i->path.external_file_string()
|
||||
|
|
Loading…
Reference in New Issue