On 5/13/2011 11:55 AM, Emmanuel Blot wrote:
No sorry, don't remember why it was commented out. Looking again at the code
suggests it would be harmless to put it back (as suggested in
http://trac.edgewall.org/ticket/9280). If tests still work after that,
perfect (you still have the commit bits of course ;-) ).
It would (I tried yesterday night, but I did not tried all the
attachment combinations), with an extra change:
Line 706:
attachment.filename = None
should be de-intented so that it always executed, or the
create_unique_file() function of trac.util fails as the filename is
combined twice with the absolute path (/path/filename/filename).
Ah yes, I see.
As my change seemed a bit kludgy, I preferred to ask for a better solution ;-)
I have not tried to investigate more.
I think that since Attachment.insert() expects a filename parameter, it
should also take care of resetting its .filename member to None at the
beginning, so that .path keeps returning the path to the parent folder,
as expected by the rest of its code.
-- Christian
--
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to trac-dev@googlegroups.com.
To unsubscribe from this group, send email to
trac-dev+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en.