From b2dea99417ebfee3d448ab6b49ca58cb2780258d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 May 2008 13:02:07 -0400 Subject: Fix ugly display when editing a page that has vanished. srcfile now has an optional second parameter to avoid it throwing an error if the source file does not exist. --- IkiWiki/Plugin/shortcut.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/shortcut.pm b/IkiWiki/Plugin/shortcut.pm index c3e1f5446..f1a38ea48 100644 --- a/IkiWiki/Plugin/shortcut.pm +++ b/IkiWiki/Plugin/shortcut.pm @@ -13,7 +13,7 @@ sub import { #{{{ sub checkconfig () { #{{{ # Preprocess the shortcuts page to get all the available shortcuts # defined before other pages are rendered. - my $srcfile=eval {srcfile("shortcuts.mdwn")}; + my $srcfile=srcfile("shortcuts.mdwn", 1); if (! defined $srcfile) { error(gettext("shortcut plugin will not work without a shortcuts.mdwn")); } -- cgit v1.2.3