From: Sven Schöling Date: Mon, 19 Nov 2012 09:38:54 +0000 (+0100) Subject: nicht hochgeladene Datei abfangen X-Git-Tag: release-3.1.0beta1~718 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d14f72e7f3ce339b7565e27fcb169181ff90d64b;p=kivitendo-erp.git nicht hochgeladene Datei abfangen --- diff --git a/SL/Controller/CsvImport.pm b/SL/Controller/CsvImport.pm index 8834b2024..23f333263 100644 --- a/SL/Controller/CsvImport.pm +++ b/SL/Controller/CsvImport.pm @@ -250,6 +250,12 @@ sub test_and_import_deferred { $file->fh->close; } + my $file = SL::SessionFile->new($self->csv_file_name, mode => '<', encoding => $self->profile->get('charset')); + if (!$file->fh) { + flash('error', $::locale->text('No file has been uploaded yet.')); + return $self->action_new; + } + $self->{background_job} = SL::BackgroundJob::CsvImport->create_job( file => $self->csv_file_name, profile => $self->profile,