Skip to content

Commit

Permalink
[backend] BSContar: allow to pass a filehandle to compress_entry
Browse files Browse the repository at this point in the history
The file must have been opened both for reading and writing.
  • Loading branch information
mlschroe committed Feb 2, 2024
1 parent cdfab2e commit 99cef18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/BSContar.pm
Expand Up @@ -99,6 +99,8 @@ sub compress_entry {
my $tmp;
if (!defined($outfile)) {
open($tmp, '+>', undef) || die("tmp file open: $!\n");
} elsif (ref($outfile)) {
$tmp = $outfile;
} else {
open($tmp, '+>', $outfile) || die("$outfile: $!\n");
}
Expand Down

0 comments on commit 99cef18

Please sign in to comment.