From: joey Date: Tue, 25 Apr 2006 01:15:20 +0000 (+0000) Subject: fix a deadloop if from ended in a / X-Git-Tag: 1.0~41 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1f06b397883128f33b96d6c9c454c2b778a36dd4;p=ikiwiki.git fix a deadloop if from ended in a / --- diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index feed00487..36d0e6008 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -378,7 +378,7 @@ sub cgi_editpage ($$) { #{{{ } else { my $dir=$from."/"; - $dir=~s![^/]+/$!!; + $dir=~s![^/]+/+$!!; if ((defined $form->param('subpage') && length $form->param('subpage')) || $page eq 'discussion') { @@ -391,7 +391,7 @@ sub cgi_editpage ($$) { #{{{ push @page_locs, $dir.$page; push @page_locs, "$from/$page"; while (length $dir) { - $dir=~s![^/]+/$!!; + $dir=~s![^/]+/+$!!; push @page_locs, $dir.$page; }