diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2002-08-20 17:15:49 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2002-08-20 17:15:49 +0000 |
commit | 18b3e6bef4398a619855174ead09b4a0e04433cf (patch) | |
tree | 5d3bf3481d5ca718e11d2d9e37ef24625abd6052 | |
parent | 9e317ac6906b109e521fe94c83b17ab999ceb3f4 (diff) | |
download | rpmdrake-18b3e6bef4398a619855174ead09b4a0e04433cf.tar rpmdrake-18b3e6bef4398a619855174ead09b4a0e04433cf.tar.gz rpmdrake-18b3e6bef4398a619855174ead09b4a0e04433cf.tar.bz2 rpmdrake-18b3e6bef4398a619855174ead09b4a0e04433cf.tar.xz rpmdrake-18b3e6bef4398a619855174ead09b4a0e04433cf.zip |
better handling of users putting ftp:// in the URL for FTP
sources
-rwxr-xr-x | edit-urpm-sources.pl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl index 7906c06c..0e73cd12 100755 --- a/edit-urpm-sources.pl +++ b/edit-urpm-sources.pl @@ -131,17 +131,16 @@ really want to replace it?"), { yesno => 1 } ) or return 0; my $info = $radios_infos{$type}; my %i = (name => $info->{name_entry}->get_text, url => $info->{url_entry}->get_text, hdlist => $info->{hdlist_entry}->get_text); my %make_url = (local => "file:/$i{url}", http => $i{url}, security => $i{url}, removable => "removable:/$i{url}"); + $i{url} =~ s|^ftp://||; $make_url{ftp} = sprintf "ftp://%s%s", $info->{login_check}->get_active ? ($info->{login_entry}->get_text.':'.$info->{pass_entry}->get_text.'@') : '', $i{url}; - $make_url{ftp} =~ s|^ftp://ftp://|ftp://|; if (member($i{name}, map { $_->{name} } @{$urpm->{media}})) { standalone::explanations("Removing medium $i{name}"); $urpm->select_media($i{name}); $urpm->remove_selected_media; } - ; add_medium_and_check($urpm, _("Please wait, adding medium..."), { probe_with_hdlist => member($type, qw(removable local)) && $i{hdlist} eq '' }, $i{name}, $make_url{$type}, $i{hdlist}, update => $type eq 'security'); |