attachment: Bugfix to create directory when moving attachment out of holding area.
parent
2913299907
commit
d23786cb6c
|
@ -273,11 +273,13 @@ sub attachments_save {
|
||||||
my $dir=attachment_holding_location($form->field('page'));
|
my $dir=attachment_holding_location($form->field('page'));
|
||||||
foreach my $filename (glob("$dir/*")) {
|
foreach my $filename (glob("$dir/*")) {
|
||||||
next unless -f $filename;
|
next unless -f $filename;
|
||||||
my $dest=$config{srcdir}."/".
|
my $destdir=$config{srcdir}."/".
|
||||||
linkpage(IkiWiki::possibly_foolish_untaint(
|
linkpage(IkiWiki::possibly_foolish_untaint(
|
||||||
attachment_location($form->field('page')))).
|
attachment_location($form->field('page'))));
|
||||||
IkiWiki::basename($filename);
|
my $destfile=IkiWiki::basename($filename);
|
||||||
|
my $dest=$destdir.$destfile;
|
||||||
unlink($dest);
|
unlink($dest);
|
||||||
|
IkiWiki::prep_writefile($destfile, $destdir);
|
||||||
rename($filename, $dest);
|
rename($filename, $dest);
|
||||||
push @attachments, $dest;
|
push @attachments, $dest;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
ikiwiki (3.20110712) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
* attachment: Bugfix to create directory when moving attachment out of
|
||||||
|
holding area.
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Mon, 11 Jul 2011 21:35:20 -0400
|
||||||
|
|
||||||
ikiwiki (3.20110711) unstable; urgency=low
|
ikiwiki (3.20110711) unstable; urgency=low
|
||||||
|
|
||||||
* Add build dep on python-support. Closes: #633536
|
* Add build dep on python-support. Closes: #633536
|
||||||
|
|
Loading…
Reference in New Issue