diff --git a/lib/download.c b/lib/download.c index 1de03008..31def4e6 100644 --- a/lib/download.c +++ b/lib/download.c @@ -258,6 +258,12 @@ xbps_fetch_file(const char *uri, const char *outputdir, bool refetch, url_st.mtime == st.st_mtime) goto out; + /* + * If size match do nothing. + */ + if (restart && url_st.size && url_st.size == st.st_size) + goto out; + /* * Remove current file (if exists). */