Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix saving/comparing mtime of files from remote for https://, file://, ftp://
Bryan Drewery committed 11 years ago
commit ec9a97d598f73daed52b6602ecee0fc3f6371ba9
parent 36be69a
1 file changed +2 -2
modified libpkg/fetch.c
@@ -590,10 +590,10 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest, time_t *t

	if (strcmp(u->scheme, "ssh") != 0) {
		if (t != NULL && st.mtime != 0) {
-
			if (st.mtime < *t) {
+
			if (st.mtime <= *t) {
				retcode = EPKG_UPTODATE;
				goto cleanup;
-
			} else if (strncmp(u->scheme, "http", 4) == 0)
+
			} else
				*t = st.mtime;
		}
		sz = st.size;