Bug: Move attachment fails if target topic does not have attachments yet.
Attempt to move an attachment to a topic that never had any attachments before (and thus do not have a
pub directory) fails because the
pub directory does not get created for target topic.
TWiki::Store::RcsFile::_moveAttachment() returns error message:
>
Failed to move attachment; oldWeb.OldTopic.file.ext -> newWeb.NewTopic (No such file or directory)
but i cannot find this message anywhere in server logs.
I have locally fixed the error by copying the directory creation code from
sub _saveAttachment.
Test case
- Create (or use existing) test topic
- Attach a file to this topic
- Create new test topic without attachments
- Go back to the first test topic, and move the attachment to the second topic
An error page is shown, suggesting to contact the system administrator.
Environment
| TWiki version: |
CVS (TWiki/Store/RcsFile.pm revision 1.6) |
| Server OS: |
FreeBSD 4.5-STABLE |
| Web server: |
Apache 1.3.26 |
| Perl version: |
5.0 patchlevel 5 subversion 3 |
| Client OS: |
Windows 2000 |
| Web Browser: |
Mozilla 1.0 |
--
AlexanderSmishlajev - 02 Aug 2002
Follow up
Fix record
Fixed, in
TWikiAlphaRelease at
CVS:lib/TWiki/Store/RcsFile.pm
and at TWiki.org.
--
PeterThoeny - 02 Aug 2002