Hi roundcube folks--

http://trac.roundcube.net/ticket/1486802 was about roundcube failures to
move drafts, sent messages, and deleted messages into their proper folders.

It looks to me like it was fixed for drafts and sent messages, but it
was *not* fixed for deleted messages.  I can't seem to convince
http://trac.roundcube.net/ to let me have an account, but i think that
ticket should be re-opened.

I think the attached patch fixes the situation for the trash (as well as
fixing any other attempt to move into a folder that doesn't exist).

Arguably, you might also want to subscribe to the newly-created folder,
and not just create it; but as a baseline, i think this is a reasonable
patch against v0.8.4.

Please let me know if there's anything i should do to help get this
adopted, or if there's some reason that this patch itself is a bad idea.

Thanks for roundcube,

        --dkg
index a9e4bd8..44f1ca9 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -37,6 +37,9 @@ if ($RCMAIL->action=='moveto' && !empty($_POST['_uid']) && strlen($_POST['_targe
     $target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true);
     $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true);

+    if (!$RCMAIL->storage->folder_exists($target)) {
+      $RCMAIL->storage->create_folder($target, true);
+    }
     $moved = $RCMAIL->storage->move_message($uids, $target, $mbox);

     if (!$moved) {

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Roundcube Development discussion mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/dev

Reply via email to