diff options
author | Christian Pointner <equinox@helsinki.at> | 2010-04-19 09:59:24 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2010-04-19 09:59:24 (GMT) |
commit | aee3275fa50dae3aab22012b11a3aaf1a428a9a1 (patch) | |
tree | a1cf4f52b80177c42883ea77fa109466da5c6fee /rhimport | |
parent | 888638fb47b9c497534fbe9cffd2e6773d39b8bc (diff) |
check for key file before import
Diffstat (limited to 'rhimport')
-rwxr-xr-x | rhimport | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -220,6 +220,15 @@ sub start_import_gui() exit 2; } + if(!rhimport::check_key_file()) { + my $parent_window = $guixml->get_widget('appwin'); + my $dialog = Gtk2::MessageDialog->new ($parent_window, 'destroy-with-parent', + 'error', 'ok', "Es wurde kein Import Key gefunden."); + $dialog->run; + $dialog->destroy; + return 0; + } + my $l_status = $guixml->get_widget('l_status'); my $filechooser = $guixml->get_widget('filechooser'); @@ -368,7 +377,9 @@ my $cl_error_cb = sub { $x =~ /^n/i; }; -(-e "$FILE") or die "file '$FILE' not found"; +rhimport::check_key_file() or die "Import Key not found, use rhimport-create-id to create one\n"; + +(-e "$FILE") or die "file '$FILE' not found\n"; if($POOL) { print "will import from playlist $FILE, with user $user\n\n"; } else { |