Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Try moving an attachment on the same topic by renaming it. Then check the raw topic data. The old META:FILEATTACHMENT is still there in addition to the new one.
Here's a quick fix. Please have a look.
--- lib/Foswiki/Meta.pm (revision 6143)
+++ lib/Foswiki/Meta.pm (working copy)
@@ -2369,6 +2373,10 @@
$fileAttachment->{movedwhen} = time();
$to->putKeyed( 'FILEATTACHMENT', $fileAttachment );
+ if ($this->getPath() eq $to->getPath()) {
+ $to->remove( 'FILEATTACHMENT', $name );
+ }
+
$to->saveAs(
undef, undef,
--
MichaelDaum - 28 Jan 2010
That should work. Have you run the unit tests?
--
CrawfordCurrie - 31 Jan 2010
Sorry no.
Most of the unit test fail for me currently for non-related issues as I tend to have trunk running with a christmas tree of other
stuff enabled.
--
MichaelDaum - 31 Jan 2010