xbps_fetch_file: in refetch case, do nothing if local/remote size match.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124035440-qhbft4gqlgbgc554
This commit is contained in:
Juan RP 2009-11-24 03:54:40 +00:00
parent 4502155554
commit 83f71f3d2b

View File

@ -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).
*/