[tinews.pl] setting sig_path in tinewsrc fails sometimes
Setting sig_path in ~/.tinewsrc fails if one uses '~' to specify the location of the file, e.g sig_path=~/.Sig. The patch below (two times glob() added) fixes this for me. Dennis --- a/tinews.pl 2017-09-22 12:31:02.000000000 +0200 +++ b/tinews.pl 2017-12-05 21:47:41.000000000 +0100 @@ -260,10 +260,10 @@ readarticle(\%Header, \@Body); # Add signature if there is none if (!$config{'no_signature'}) { if ($config{'add_signature'} && !grep {/^-- /} @Body) { - if (-r $config{'sig_path'}) { + if (-r glob($config{'sig_path'})) { my $l = 0; push @Body, "-- \n"; - open(my $SIGNATURE, '<', $config{'sig_path'}) or die("Can't open " . $config{'sig_path'} . ": $!"); + open(my $SIGNATURE, '<', glob($config{'sig_path'})) or die("Can't open " . $config{'sig_path'} . ": $!"); while (<$SIGNATURE>){ die $config{'sig_path'} . " longer than " . $config{'sig_max_lines'}. " lines!" if (++$l > $config{'sig_max_lines'}); push @Body, $_;
participants (1)
-
Dennis Preiser