summaryrefslogtreecommitdiff
path: root/lib/libalpm/dload.c
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2008-08-04 01:16:08 +0200
committerDan McGee <dan@archlinux.org>2008-08-05 19:30:29 -0500
commit72c5a298a3ee0f18019010ef2eb43da654ec25f8 (patch)
treed29ee5fecd2b13d972eda50710041e363a00037b /lib/libalpm/dload.c
parent4476598e4e128f4595d5383ecb51a9576a447b5b (diff)
downloadpacman-72c5a298a3ee0f18019010ef2eb43da654ec25f8.tar.xz
Avoid double slashes in URLs given to libdownload.
If a Server specified in pacman.conf had a trailing slash, libalpm ended up building URLs with double slashes, and this broke libdownload with errors like the following one : error: failed retrieving file 'redland-1.0.8-1-i686.pkg.tar.gz' from 192.168.0.90 : Command okay So the public function alpm_db_set_server will make sure to remove the trailing slash of servers. For the private function _alpm_download_single_file, I only added a comment. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/dload.c')
-rw-r--r--lib/libalpm/dload.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index ef12646e..c07040b5 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -365,6 +365,7 @@ static int download(const char *url, const char *localpath,
* than mtimeold.
* - if *mtimenew is non-NULL, it will be filled with the mtime of the remote
* file.
+ * - servers must be a list of urls WITHOUT trailing slashes.
*
* RETURN: 0 for successful download
* 1 if the mtimes are identical