summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c
index 1d972bdb..650c594a 100644
--- a/lib/libalpm/server.c
+++ b/lib/libalpm/server.c
@@ -71,6 +71,10 @@ pmserver_t *_alpm_server_new(const char *url)
strcpy(u->pwd, "libalpm@guest");
}
+ /* remove trailing slashes, just to clean up the rest of the code */
+ for(int i = strlen(u->doc) - 1; u->doc[i] == '/'; --i)
+ u->doc[i] = '\0';
+
server->s_url = u;
return server;