summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 53e47467..94d5a447 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -900,8 +900,7 @@ sub _take_n_elem {
sub _create_one_metalink_line {
my ($medium, $mirror, $rel_file, $counter) = @_;
- my $type = $mirror->{url};
- $type =~ s!://.*!!;
+ my $type = urpm::protocol_from_url($mirror->{url});
# If more than 100 mirrors, give all the remaining mirrors a priority of 0
my $preference = max(0, 100 - $counter);