tFix small regression - transliterate - Transliteration engine
HTML git clone git://lumidify.org/transliterate.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 70012257f6d6eb86532f71538529aa74627cc31c
DIR parent 3f5ea2bc94c0f4e1786fb7029db9dd2dbcc23473
HTML Author: lumidify <nobody@lumidify.org>
Date: Wed, 8 Apr 2020 10:44:23 +0200
Fix small regression
Diffstat:
M transliterate.pl | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
DIR diff --git a/transliterate.pl b/transliterate.pl
t@@ -918,8 +918,11 @@ sub handle_unknown_word_action {
} elsif ($action->[1] eq "run") {
# Print to error file if ignore isn't permanent
return 0 if ($args->{"errors"} eq "");
- my $fh = open_file_rel_abs $args->{"errors"}, $args->{"config"}, ">>";
- return 0 if !$fh;
+ my $fh;
+ if (!open($fh, ">>", $args->{"errors"})) {
+ warn "ERROR: Can't open error file \"$args->{errors}\".\n";
+ return 0;
+ }
print($fh $action->[2] . "\n");
close($fh);
}