Skip to content
Snippets Groups Projects
Commit 2c00b430 authored by Marek Szuba's avatar Marek Szuba
Browse files

ChecksumParser: check if we have opened the temporary file for writing

parent 41aa26b1
No related branches found
No related tags found
3 merge requests!457Patch to support longer assembly names in the mapping session table.,!402Prevent ChecksumParser from losing one xref per input file,!402Prevent ChecksumParser from losing one xref per input file
......@@ -28,6 +28,7 @@ package XrefParser::ChecksumParser;
use strict;
use warnings;
use Carp;
use English qw( -no_match_vars );
use IO::File;
use base qw( XrefParser::BaseParser );
......@@ -52,7 +53,8 @@ sub run {
print "Target file '${target_file}' already exists; removing\n" if $verbose;
unlink $target_file;
}
my $output_fh = IO::File->new($target_file, 'w');
my $output_fh = IO::File->new($target_file, 'w')
|| croak "Failed to open ${target_file} for writing: ${OS_ERROR}";
$self->_transfer_contents($input_fh, $output_fh, $source_id);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment