[Kde-pim] Review Request 112734: Fix renaming of IMAP folders on server with separator other than "/"

Dan Vrátil dvratil at redhat.com
Mon Sep 16 15:28:35 BST 2013



> On Sept. 15, 2013, 9:17 p.m., Andras Mantia wrote:
> > It seems ok, jus be sure to test that it doesn't introduce a regression for the fix here http://git.reviewboard.kde.org/r/109276/ (point 1). (Yes, that fix needs an improvement.)

Tried creating a new top-level folder "foo" on two servers, one using "/" separator and the other "." separator. Both folders had remoteId set to "/foo", so no regression has been introduced, but it's still broken, because on the second server, the remoteId should have been ".foo" (point of this patch was not to fix folder creation, but since I started digging around, let's see what we can do :-) )

Response to LSUB command is "LSUB attribute separator name" (http://tools.ietf.org/html/rfc1730#section-7.2.3) - so what about parsing the separator from LSUB reply on the very first folder sync and storing it as an attribute of the root folder? We can then retrieve the attribute on resource start and just remember it, instead of guessing it every time someone calls  ResourceState::separatorCharacter().


- Dan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112734/#review40081
-----------------------------------------------------------


On Sept. 15, 2013, 12:33 p.m., Dan Vrátil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112734/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2013, 12:33 p.m.)
> 
> 
> Review request for KDEPIM and Kevin Ottens.
> 
> 
> Description
> -------
> 
> ResourceTask::separatorCharacter() is giving up too easily when parent collection is not available (which happens with ChangeCollectionTask for instance) and just falls back to "/" separator. In cases like ChangeCollectionTask however, we can get the separator from remoteId of the current collection.
> 
> This fixes renaming of subfolders on servers that use for instance "." as a separator.
> 
> 
> This addresses bug 324219.
>     http://bugs.kde.org/show_bug.cgi?id=324219
> 
> 
> Diffs
> -----
> 
>   resources/imap/resourcetask.cpp f63e986 
> 
> Diff: http://git.reviewboard.kde.org/r/112734/diff/
> 
> 
> Testing
> -------
> 
> Successfully renamed a folder on a server which is using "." separator. Since separatorCharacter() is reimplemented in ResourceState, it cannot be properly unittested (tests use DummyResourceState with custom simplified implementation)
> 
> 
> Thanks,
> 
> Dan Vrátil
> 
>

_______________________________________________
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