summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-01-19 18:42:24 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-01-19 18:42:24 +0000
commit8c9c0efd525c984805edba83131a9e118952011e (patch)
tree550721cccec5275eb4120039acf7d3f015787b91
parent36e4dcac8ecdefa80f313a8484d072d2deab22c9 (diff)
downloadurpmi-8c9c0efd525c984805edba83131a9e118952011e.tar
urpmi-8c9c0efd525c984805edba83131a9e118952011e.tar.gz
urpmi-8c9c0efd525c984805edba83131a9e118952011e.tar.bz2
urpmi-8c9c0efd525c984805edba83131a9e118952011e.tar.xz
urpmi-8c9c0efd525c984805edba83131a9e118952011e.zip
Make gurpmi save srpms
-rw-r--r--gurpmi5
1 files changed, 3 insertions, 2 deletions
diff --git a/gurpmi b/gurpmi
index 56108041..a3a910d9 100644
--- a/gurpmi
+++ b/gurpmi
@@ -116,12 +116,13 @@ Proceed?", join "\n", @all_rpms)
my $file_dialog = Gtk2::FileSelection->new(N("Choose location to save file"));
$file_dialog->set_modal(1);
$file_dialog->set_position('center');
- $file_dialog->set_filename($rpms->[0]); #- TODO must work for srpms too
+ my $filename = @$srpms > 0 ? $srpms->[0] : $rpms->[0];
+ $file_dialog->set_filename($filename);
$file_dialog->hide_fileop_buttons;
$file_dialog->ok_button->signal_connect(clicked => sub {
my $location = $file_dialog->get_filename;
quit();
- $location and exec '/bin/mv', '-f', $rpms->[0], $location;
+ $location and exec '/bin/mv', '-f', $filename, $location;
});
$file_dialog->cancel_button->signal_connect(clicked => \&quit);
$file_dialog->show;