]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
fix a deadloop if from ended in a /
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 25 Apr 2006 01:15:20 +0000 (01:15 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 25 Apr 2006 01:15:20 +0000 (01:15 +0000)
IkiWiki/CGI.pm

index feed00487c23fbd42ba8a7ffffd14b8b1985bce8..36d0e60082896e81fb8a16908edc208f74362869 100644 (file)
@@ -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;
                                }