summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index da9b9274..9dce4aff 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -219,7 +219,6 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
{
alpm_list_t *lp;
char path[PATH_MAX];
- alpm_list_t *files = NULL;
time_t newmtime = 0, lastupdate = 0;
const char *dbpath;
int ret;
@@ -252,13 +251,10 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
/* build a one-element list */
snprintf(path, PATH_MAX, "%s" DBEXT, db->treename);
- files = alpm_list_add(files, strdup(path));
-
dbpath = alpm_option_get_dbpath();
- ret = _alpm_downloadfiles_forreal(db->servers, dbpath, files, lastupdate,
- &newmtime, NULL, 0);
- FREELIST(files);
+ ret = _alpm_download_single_file(path, db->servers, dbpath, lastupdate, &newmtime);
+
if(ret == 1) {
/* mtimes match, do nothing */
pm_errno = 0;