don't show an error if the image is missing, instead, a broken link

master
Joey Hess 2008-07-21 16:53:52 -04:00
parent 7910f1c352
commit 97e21ae21c
1 changed files with 2 additions and 2 deletions

View File

@ -42,8 +42,8 @@ sub preprocess (@) { #{{{
my $file = bestlink($params{page}, $image);
my $srcfile = srcfile($file, 1);
if (! defined $srcfile) {
error(sprintf(gettext("%s not found"), $image));
if (! length $file || ! defined $srcfile) {
return htmllink($params{page}, $params{destpage}, $image);
}
my $dir = $params{page};