Fix use of the default plugin dir path in the logging startup when no

plugin_dir is configured.  Slightly worsens duplication of code with
plugin_dir() to continue avoiding infinite recursion.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@674 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Devin Carraway 2006-11-08 10:25:45 +00:00
parent 839eddc558
commit ecb24ef131

View File

@ -23,6 +23,10 @@ sub load_logging {
$configdir = $self->config_dir('plugin_dirs'); $configdir = $self->config_dir('plugin_dirs');
$configfile = "$configdir/plugin_dirs"; $configfile = "$configdir/plugin_dirs";
my @plugin_dirs = $self->_config_from_file($configfile,'plugin_dirs'); my @plugin_dirs = $self->_config_from_file($configfile,'plugin_dirs');
unless (@plugin_dirs) {
my ($name) = ($0 =~ m!(.*?)/([^/]+)$!);
@plugin_dirs = ( "$name/plugins" );
}
my @loaded; my @loaded;
for my $logger (@loggers) { for my $logger (@loggers) {