pull/235/merge
Samantha McVey 2018-06-27 07:13:01 +00:00 committed by GitHub
commit 170d02a586
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

8
btrbk
View File

@ -27,6 +27,8 @@
use strict;
use warnings FATAL => qw( all ), NONFATAL => qw( deprecated );
binmode STDOUT, ':encoding(UTF-8)';
binmode STDERR, ':encoding(UTF-8)';
use Carp qw(confess);
use Getopt::Long qw(GetOptions);
@ -419,7 +421,9 @@ sub init_transaction_log($$)
my $file = shift;
my $config_syslog_facility = shift;
if(defined($file) && (not $dryrun)) {
if(open($tlog_fh, ">> $file")) {
if(open($tlog_fh, '>>', $file)) {
binmode $tlog_fh, ':encoding(UTF-8)';
# print headers (disabled)
# print_formatted("transaction", [ ], output_format => "tlog", outfile => $tlog_fh);
INFO "Using transaction log: $file";
@ -3544,6 +3548,8 @@ sub parse_config(@)
INFO "Using configuration: $file";
open(FILE, '<', $file) or die $!;
binmode FILE, ':encoding(UTF-8)';
while (<FILE>) {
chomp;
s/#.*//; # remove comments