aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-27 19:20:14 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-27 19:20:14 -0400
commit25142cfa1d5b3603bd4ad22925a66ab6fe936acb (patch)
treec3cb66fb8d54127a1432fdbc16295e619f69b0f1 /IkiWiki.pm
parent9be28d7865a335a5e0f3d62a3e96178a6dc74a1b (diff)
downloadikiwiki-25142cfa1d5b3603bd4ad22925a66ab6fe936acb.tar
ikiwiki-25142cfa1d5b3603bd4ad22925a66ab6fe936acb.tar.gz
libdir can be empty
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 0746ef24b..ad41215c1 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -433,14 +433,14 @@ sub listplugins () { #{{{
my %ret;
foreach my $dir (@INC, $config{libdir}) {
- next unless defined $dir;
+ next unless defined $dir && length $dir;
foreach my $file (glob("$dir/IkiWiki/Plugin/*.pm")) {
my ($plugin)=$file=~/.*\/(.*)\.pm$/;
$ret{$plugin}=1;
}
}
foreach my $dir ($config{libdir}, "$installdir/lib/ikiwiki") {
- next unless defined $dir;
+ next unless defined $dir && length $dir;
foreach my $file (glob("$dir/plugins/*")) {
$ret{basename($file)}=1 if -x $file;
}
@@ -450,7 +450,7 @@ sub listplugins () { #{{{
} #}}}
sub loadplugins () { #{{{
- if (defined $config{libdir}) {
+ if (defined $config{libdir} && length $config{libdir}) {
unshift @INC, possibly_foolish_untaint($config{libdir});
}