diff options
author | Joey Hess <joey@kitenet.net> | 2011-07-07 20:32:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-07-07 20:32:14 -0400 |
commit | 9f7d9ab356ba81972bf8bed8486a6994fef51667 (patch) | |
tree | 364eb8326a48b6a79696f26196cca8a001c2c42b /IkiWiki | |
parent | 786afc42e09d6bf52166608c230a9a77025fbf56 (diff) | |
download | ikiwiki-9f7d9ab356ba81972bf8bed8486a6994fef51667.tar ikiwiki-9f7d9ab356ba81972bf8bed8486a6994fef51667.tar.gz |
Bugfix for trying to attach files to a subpage of the index page.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/attachment.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index 4d6dee23e..52bac7c1e 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -303,8 +303,8 @@ sub attachment_location ($) { my $page=shift; # Put the attachment in a subdir of the page it's attached - # to, unless that page is an "index" page. - $page=~s/(^|\/)index//; + # to, unless that page is the "index" page. + return "" if $page eq 'index'; $page.="/" if length $page; return $page; |