xbps_fetch_file: don't check for file truncation if server answers with invalid info.
This commit is contained in:
parent
42e0f19bbe
commit
bdcdb9f1a0
3
NEWS
3
NEWS
@ -1,5 +1,8 @@
|
||||
xbps-0.21 (???):
|
||||
|
||||
* Fix regression in xbps_fetch_file() when fetching files from HTTP
|
||||
servers that don't provide us enough details (file length, mtime, etc).
|
||||
|
||||
* Fix regression introduced in b9136c61c95698a5dafbc69ee9cd873110c68e45,
|
||||
breaking package conflicts detection.
|
||||
|
||||
|
@ -249,7 +249,7 @@ xbps_fetch_file(struct xbps_handle *xhp, const char *uri, const char *flags)
|
||||
errno = EIO;
|
||||
rv = -1;
|
||||
goto out;
|
||||
} else if ((bytes_dload + url->offset) != url_st.size) {
|
||||
} else if (url_st.size > 0 && ((bytes_dload + url->offset) != url_st.size)) {
|
||||
xbps_dbg_printf(xhp, "file %s is truncated\n", filename);
|
||||
errno = EIO;
|
||||
rv = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user