[Kde-pim] IMAP resource: RemoveCollectionRecursiveTask::deleteNextMailbox() #287903

Volker Krause vkrause at kde.org
Mon Nov 18 15:44:30 GMT 2013


On Monday 18 November 2013 16:32:16 Martin Koller wrote:
> On Monday 18 November 2013 09:42:02 Christian Mollekopf wrote:
> > On Monday 18 November 2013 09.36:13 Christian Mollekopf wrote:
> > > On Sunday 17 November 2013 16.35:03 Martin Koller wrote:
> > > > I'm debugging why the imap resource can not delete an empty folder
> > > > https://bugs.kde.org/show_bug.cgi?id(7903
> > > > 
> > > > the problem is that in
> > > > RemoveCollectionRecursiveTask::deleteNextMailbox()
> > > > the code tries to select all messages in the folder to set them to
> > > > "deleted". However if the folder is empty, the server replies with an
> > > > error
> > > > "Invalid messageset" and the deletion is never done.
> > > > 
> > > > Why does the imap resource try to delete all mails at all ?
> > > > When the folder is deleted, all mails are removed automatically.
> > > 
> > > Hey,
> > > 
> > > This seems indeed to be a pointless step. I'll check the spec, but I
> > > assume
> > > you are right that we can just delete the collection.
> > 
> > This doesn't seem to work with subfolders though,
> 
> what does not work with subfolders ?
> In my test, where I commented the "delete mails" step, I could remove a
> folder which had a subfolder (If I understand the code correctly, it
> deletes the folders recursively, starting with the lowest in the tree
> (leafs first))

IIRC this code was added because some implementations do not support deletion 
of non-empty folders, or recursive deletion of folders with sub-folders. The 
fact that it works with one server unfortunately says very little about the 
the general case with IMAP :-(

We can probably relax the error handling in this case though, ie. continue 
even if one of the sub-deletions failed, we might still succeed in some more 
cases then.

regards,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20131118/5b2d2997/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list