On Apr Thu 24 2008 10:38, Martin Spuetz wrote:
Hello roundcube-Team,
i wrote a tiny patch that creates .Trash if it doesn't exist when you delete an email.
Mmmm... bear with me a little :)
When I pulled one of the latest releases from the SVN repo, I had these lines in main.php.dist
// move messages to this folder when deleting them // leave blank if they should be deleted directly $rcmail_config['trash_mbox'] = 'Trash';
plus
// automatically create the above listed default folders on login $rcmail_config['create_default_folders'] = FALSE;
So, the behaviours I expect are
1. trash_mbox unset: delete messages automatically, no matter if
there is a Trash folder or not.
2. trash_mbox set AND create_default_folders FALSE: it is assumed
that the Trash folder exists. I guess that if it does not exist,
the message will be deleted and *not* saved :-?
3. trash_mbox set AND create_default_folders TRUE: if there is no
trash folder, it will be created, so the deleted messages will
always go there.
Having said this, I believe that your patch tries to cover the uncertain behaviour in Case (2) when the Trash folder does not exists. If so, I think it would be necessary to check the conditions (trash_mbox set AND create_default_folders FALSE) to ensure that we are in that case.
If I am all wrong here, please ignore my rant :) and, in any case, could you clarify which case does your patch cover?
My 2 cents!