fix the other half of the filecheck filename bug

master
Joey Hess 2010-03-26 00:16:21 -04:00
parent ab89494797
commit 243b0dd082
4 changed files with 6 additions and 4 deletions

View File

@ -49,7 +49,7 @@ sub check_canremove ($$$) {
# This is sorta overkill, but better safe than sorry. # This is sorta overkill, but better safe than sorry.
if (! defined pagetype($pagesources{$page})) { if (! defined pagetype($pagesources{$page})) {
if (IkiWiki::Plugin::attachment->can("check_canattach")) { if (IkiWiki::Plugin::attachment->can("check_canattach")) {
IkiWiki::Plugin::attachment::check_canattach($session, $page, $file); IkiWiki::Plugin::attachment::check_canattach($session, $page, "$config{srcdir}/$file");
} }
else { else {
error("removal of attachments is not allowed"); error("removal of attachments is not allowed");

View File

@ -50,7 +50,7 @@ sub check_canrename ($$$$$$) {
IkiWiki::check_canedit($src, $q, $session); IkiWiki::check_canedit($src, $q, $session);
if ($attachment) { if ($attachment) {
if (IkiWiki::Plugin::attachment->can("check_canattach")) { if (IkiWiki::Plugin::attachment->can("check_canattach")) {
IkiWiki::Plugin::attachment::check_canattach($session, $src, $srcfile); IkiWiki::Plugin::attachment::check_canattach($session, $src, "$config{srcdir}/$srcfile");
} }
else { else {
error("renaming of attachments is not allowed"); error("renaming of attachments is not allowed");
@ -85,7 +85,7 @@ sub check_canrename ($$$$$$) {
if ($attachment) { if ($attachment) {
# Note that $srcfile is used here, not $destfile, # Note that $srcfile is used here, not $destfile,
# because it wants the current file, to check it. # because it wants the current file, to check it.
IkiWiki::Plugin::attachment::check_canattach($session, $dest, $srcfile); IkiWiki::Plugin::attachment::check_canattach($session, $dest, "$config{srcdir}/$srcfile");
} }
} }

2
debian/changelog vendored
View File

@ -15,7 +15,7 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low
* Allow wrappers to be built using tcc. * Allow wrappers to be built using tcc.
* Add support for setup files written in YAML. * Add support for setup files written in YAML.
* Add --set-yaml switch for setting more complex config file options. * Add --set-yaml switch for setting more complex config file options.
* filecheck: Fix bug that prevented the pagespecs from matching when * filecheck: Fix bugs that prevented the pagespecs from matching when
not called by attachment plugin. not called by attachment plugin.
-- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500

View File

@ -25,6 +25,8 @@ It turns out that the filecheck plugin couldn't find the file, because it was me
>>>>>> Yes, it works! --[[KathrynAndersen]] >>>>>> Yes, it works! --[[KathrynAndersen]]
applied && [[done]]
<pre> <pre>
diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm
index f59d026..0fc180f 100644 index f59d026..0fc180f 100644