diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-08-19 11:43:27 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-19 19:00:40 -0500 |
commit | 43940f591ed77f984c49fe8a3629d66dbf78bfb0 (patch) | |
tree | bde0bc07fbffc8b37a1b123324f38edce7efc587 /lib/libalpm/sync.c | |
parent | eae363c96fb5ffce8e88cb63c780769b1410a1f9 (diff) | |
download | pacman-43940f591ed77f984c49fe8a3629d66dbf78bfb0.tar.xz |
dload: rename payload->filename to payload->remote_name
This is a far more accurate description of what this is, since it's more
than likely not really a filename at all, but the name after a final
slash on a URL.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r-- | lib/libalpm/sync.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index e3e7fa90..b048777c 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -810,7 +810,7 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas) struct dload_payload *dpayload; CALLOC(dpayload, 1, sizeof(*dpayload), RET_ERR(handle, ALPM_ERR_MEMORY, -1)); - STRDUP(dpayload->filename, delta->delta, RET_ERR(handle, ALPM_ERR_MEMORY, -1)); + STRDUP(dpayload->remote_name, delta->delta, RET_ERR(handle, ALPM_ERR_MEMORY, -1)); dpayload->max_size = delta->download_size; files = alpm_list_add(files, dpayload); @@ -824,7 +824,7 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas) ASSERT(spkg->filename != NULL, RET_ERR(handle, ALPM_ERR_PKG_INVALID_NAME, -1)); CALLOC(payload, 1, sizeof(*payload), RET_ERR(handle, ALPM_ERR_MEMORY, -1)); - STRDUP(payload->filename, spkg->filename, RET_ERR(handle, ALPM_ERR_MEMORY, -1)); + STRDUP(payload->remote_name, spkg->filename, RET_ERR(handle, ALPM_ERR_MEMORY, -1)); payload->max_size = alpm_pkg_get_size(spkg); files = alpm_list_add(files, payload); @@ -844,9 +844,9 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas) size_t len; /* print server + filename into a buffer */ - len = strlen(server_url) + strlen(payload->filename) + 2; + len = strlen(server_url) + strlen(payload->remote_name) + 2; CALLOC(payload->fileurl, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, -1)); - snprintf(payload->fileurl, len, "%s/%s", server_url, payload->filename); + snprintf(payload->fileurl, len, "%s/%s", server_url, payload->remote_name); payload->handle = handle; payload->allow_resume = 1; |