rpm-software-management / librepo

A library providing C and Python (libcURL like) API for downloading packages and linux repository metadata in rpm-md format
http://rpm-software-management.github.io/librepo/
GNU Lesser General Public License v2.1
74 stars 91 forks source link

Truncate downloaded file more correctly #240

Open malmond77 opened 3 years ago

malmond77 commented 3 years ago

The previous code would only truncate the file, and turn off resume if the xattr was missing. This left a gap when resume was disabled, and the xattr was missing - the file wouldn't get truncated if present.

This behaviour is strictly needed for #222 to work correctly. That does not support resuming (sorry, one day it could), so it explicitly disables resuming.

malmond77 commented 3 years ago

I should have put this as a draft while I work on this, do not review yet :)