Fix bad date format error introduced with the %M variable.
This commit is contained in:
parent
ce0b1caf02
commit
2e14da8bc9
|
@ -2868,7 +2868,7 @@ sub parse_config
|
||||||
while (my $l = <CONF>) {
|
while (my $l = <CONF>) {
|
||||||
chomp($l);
|
chomp($l);
|
||||||
next if (!$l || ($l =~ /^[\s\t]*#/));
|
next if (!$l || ($l =~ /^[\s\t]*#/));
|
||||||
my ($key, $val) = split(/[\s\t]+/, $l);
|
my ($key, $val) = split(/[\s\t]+/, $l, 2);
|
||||||
$opt{$key} = $val;
|
$opt{$key} = $val;
|
||||||
}
|
}
|
||||||
close(CONF);
|
close(CONF);
|
||||||
|
@ -2883,8 +2883,8 @@ sub parse_config
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
if (exists $opt{DateFormat}) {
|
if (exists $opt{DateFormat}) {
|
||||||
if ( ($opt{DateFormat} !~ m#\%y#) || ($opt{DateFormat} !~ m#\%m#) || ($opt{DateFormat} !~ m#\%d#) ) {
|
if ( ($opt{DateFormat} !~ m#\%y#) || (($opt{DateFormat} !~ m#\%m#) && ($opt{DateFormat} !~ m#\%M#) )|| ($opt{DateFormat} !~ m#\%d#) ) {
|
||||||
print STDERR "Error: bad date format, must have \%y, \%m, \%d. See option: DateFormat\n";
|
print STDERR "Error: bad date format: $opt{DateFormat}, must have \%y, \%m or \%M, \%d. See DateFormat option.\n";
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue