diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-04-25 01:15:20 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-04-25 01:15:20 +0000 |
commit | 1f06b397883128f33b96d6c9c454c2b778a36dd4 (patch) | |
tree | 6c266a2c950276a7f4613fb5715bf3b8f0fc938a | |
parent | 1ba7023746b17c3f044b71799ffa304f49a7cf73 (diff) |
fix a deadloop if from ended in a /
-rw-r--r-- | IkiWiki/CGI.pm | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |