projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a61849e
)
bugfixes
author
Joey Hess
<joey@kitenet.net>
Tue, 14 Jun 2011 19:19:23 +0000
(15:19 -0400)
committer
Joey Hess
<joey@kitenet.net>
Tue, 14 Jun 2011 19:19:23 +0000
(15:19 -0400)
IkiWiki/Plugin/attachment.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/attachment.pm
b/IkiWiki/Plugin/attachment.pm
index ea40379ffaa21351880d7f13aebeeebaf1f5f556..f97ab45a4ff562604712850801eb480cc6c293a6 100644
(file)
--- a/
IkiWiki/Plugin/attachment.pm
+++ b/
IkiWiki/Plugin/attachment.pm
@@
-322,12
+322,13
@@
sub attachment_list ($) {
my $dir=attachment_holding_dir($page);
my $heldmsg=gettext("this attachment is not yet saved");
foreach my $file (glob("$dir/*")) {
my $dir=attachment_holding_dir($page);
my $heldmsg=gettext("this attachment is not yet saved");
foreach my $file (glob("$dir/*")) {
- my $mtime=(stat($file))[9];
- my $f=$file;
- $f=~s/^\Q$dir\E\///;
+ next unless -f $file;
+ my $mtime=(stat(_))[9];
+ my $base=IkiWiki::basename($file);
+ my $f=$loc.$base;
$attachments{$f}={
$attachments{$f}={
- $std->($
page."/".$f, (stat($file))[9], (stat($file
))[7]),
- link => "<span title=\"$heldmsg\">$
f
</span>",
+ $std->($
f, (stat($file))[9], (stat(_
))[7]),
+ link => "<span title=\"$heldmsg\">$
base
</span>",
}
}
}
}