xbps_fetch_file: set bytes downloaded correctly for the fetch client cb.

This commit is contained in:
Juan RP
2011-12-01 12:21:13 +01:00
parent e7562fa72d
commit 8be527cbdf
2 changed files with 4 additions and 7 deletions

View File

@@ -265,7 +265,7 @@ xbps_fetch_file(const char *uri,
* and let the user know that the transfer is going to start
* immediately.
*/
xbps_set_cb_fetch(url_st.size, url->offset, -1,
xbps_set_cb_fetch(url_st.size, url->offset, url->offset,
filename, true, false, false);
/*
* Start fetching requested file.
@@ -282,7 +282,7 @@ xbps_fetch_file(const char *uri,
* Let the fetch progress callback know that
* we are sucking more bytes from it.
*/
xbps_set_cb_fetch(url_st.size, url->offset, bytes_dload,
xbps_set_cb_fetch(url_st.size, url->offset, url->offset + bytes_dload,
filename, false, true, false);
}
if (bytes_read == -1) {