summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-01-22 10:20:38 -0400
committerJoey Hess <joey@kitenet.net>2011-01-22 10:20:38 -0400
commitb5d7469830e3569adc0664b645f1321ba54b3655 (patch)
treeabfbb5a994d550f485b7fd274eda78b12e5d44e7 /IkiWiki
parentdcfeaaad5b6ac478251e37be777de40da4d0909c (diff)
rename: Fix crash when renaming a page that is linked to by a page in an underlay.
Skip fixing links in such pages. The user will get a list of pages that still link to the old page.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/rename.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm
index 57747d3c9..e871b815d 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
@@ -567,6 +567,7 @@ sub fixlinks ($$$) {
}
if ($needfix) {
my $file=$pagesources{$page};
+ next unless -e $config{srcdir}."/".$file;
my $oldcontent=readfile($config{srcdir}."/".$file);
my $content=renamepage_hook($page, $rename->{src}, $rename->{dest}, $oldcontent);
if ($oldcontent ne $content) {