Fixed issue 19 "xbps-src cannot fetch source with unknown Content-Length".

This commit is contained in:
Juan RP
2012-01-05 12:26:57 +01:00
parent 7d631c5d11
commit c83a77c1b5
4 changed files with 23 additions and 9 deletions

View File

@ -226,10 +226,9 @@ xbps_fetch_file(const char *uri,
goto out;
}
if (url_st.size == -1) {
xbps_dbg_printf("Remote file size is unknown!\n");
errno = EINVAL;
rv = -1;
goto out;
xbps_dbg_printf("Remote file size is unknown, resume "
"not possible...\n");
restart = false;
} else if (st.st_size > url_st.size) {
/*
* Remove local file if bigger than remote, and refetch the