]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/polygen.pm
fix
[git.ikiwiki.info.git] / IkiWiki / Plugin / polygen.pm
index c148891672ebc54cfc6196b1143d26725c95974e..2ed81c8e46d13ec0d94f1d6d38b73dfdd8cb0573 100644 (file)
@@ -27,6 +27,9 @@ sub preprocess (@) { #{{{
        $symbol =~ s/[^A-Za-z0-9]//g if defined $symbol;
 
        my $grmfile = '/usr/share/polygen/ita/polygen.grm';
        $symbol =~ s/[^A-Za-z0-9]//g if defined $symbol;
 
        my $grmfile = '/usr/share/polygen/ita/polygen.grm';
+       if (! -d '/usr/share/polygen') {
+               return "[[polygen not installed]]";
+       }
        find({wanted => sub {
                        if (substr($File::Find::name, -length($grammar)) eq $grammar) {
                                $grmfile = IkiWiki::possibly_foolish_untaint($File::Find::name);
        find({wanted => sub {
                        if (substr($File::Find::name, -length($grammar)) eq $grammar) {
                                $grmfile = IkiWiki::possibly_foolish_untaint($File::Find::name);