aboutsummaryrefslogtreecommitdiffstats
path: root/edit-urpm-sources.pl
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-08-28 11:30:29 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-08-28 11:30:29 +0000
commit498b510cf13b107262a3dd0fae6197fa0976de2a (patch)
tree4a94e4abff04e125a681581f62c45794bbff0abc /edit-urpm-sources.pl
parent7c0ff4ba074cce7188ff4e36e719f21e3b00b056 (diff)
downloadrpmdrake-498b510cf13b107262a3dd0fae6197fa0976de2a.tar
rpmdrake-498b510cf13b107262a3dd0fae6197fa0976de2a.tar.gz
rpmdrake-498b510cf13b107262a3dd0fae6197fa0976de2a.tar.bz2
rpmdrake-498b510cf13b107262a3dd0fae6197fa0976de2a.tar.xz
rpmdrake-498b510cf13b107262a3dd0fae6197fa0976de2a.zip
fix #4914 (program crashes when trying to add a medium)
Diffstat (limited to 'edit-urpm-sources.pl')
-rwxr-xr-xedit-urpm-sources.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl
index 625169ba..5bd34a66 100755
--- a/edit-urpm-sources.pl
+++ b/edit-urpm-sources.pl
@@ -133,7 +133,7 @@ really want to replace it?"), yesno => 1) or return 0;
1;
};
- my ($type, %i, %make_url);
+ my ($type, $probe, %i, %make_url);
gtkadd($w->{window},
gtkpack(Gtk2::VBox->new(0,5),
Gtk2::Label->new(N("Adding a medium:")),
@@ -153,6 +153,7 @@ really want to replace it?"), yesno => 1) or return 0;
? ($info->{login_entry}->get_text.':'.$info->{pass_entry}->get_text.'@')
: '',
$i{url};
+ $probe = $info->{hdlist_check}->get_active == 0 || $i{hdlist} eq '';
Gtk2->main_quit;
}
}),
@@ -164,7 +165,7 @@ really want to replace it?"), yesno => 1) or return 0;
$urpm->remove_selected_media;
}
add_medium_and_check($urpm, N("Please wait, adding medium..."),
- { probe_with => !$info->{hdlist_check}->get_active || $i{hdlist} eq '' },
+ { probe_with => $probe },
$i{name}, $make_url{$type}, $i{hdlist}, update => $type eq 'security');
return 1;
}