View | Details | Raw Unified | Return to bug 20254
Collapse All | Expand All

(-)a/Koha/Edifact/Transport.pm (-1 / +9 lines)
Lines 182-187 sub sftp_download { Link Here
182
sub ingest {
182
sub ingest {
183
    my ( $self, $msg_hash, @downloaded_files ) = @_;
183
    my ( $self, $msg_hash, @downloaded_files ) = @_;
184
    foreach my $f (@downloaded_files) {
184
    foreach my $f (@downloaded_files) {
185
186
        # Check file has not been downloaded already
187
        my $existing_file = $self->{schema}->resultset('EdifactMessage')
188
          ->find( { filename => $f, } );
189
        if ($existing_file) {
190
            carp "skipping ingest of $f : filename exists";
191
            next;
192
        }
193
185
        $msg_hash->{filename} = $f;
194
        $msg_hash->{filename} = $f;
186
        my $file_content =
195
        my $file_content =
187
          read_file( "$self->{working_dir}/$f", binmode => ':raw' );
196
          read_file( "$self->{working_dir}/$f", binmode => ':raw' );
188
- 

Return to bug 20254