[Kde-pim] Review Request 108810: Modify the content of mMaildirsForCollection after a folder-move

Guy Maurel guy-kde at maurel.de
Fri Feb 8 15:01:15 GMT 2013


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

(Updated Feb. 8, 2013, 3:01 p.m.)


Review request for KDEPIM, Andras Mantia, Kevin Krammer, Volker Krause, and Wolfgang Rohdewald.


Changes
-------

allmost ...
Using the dump, I can see that the old line is still present:
List of objects of mMaildirsForCollection
+-------------------------------------------------+------------+-----------------------------------------------------------------------+
+ key                                             + name       + remoteId                                                              +
+-------------------------------------------------+------------+-----------------------------------------------------------------------+
| /home/guy-kde/.local/share/local-mail/sent-mail | sent-mail  | /home/guy-kde/.local/share/local-mail/sent-mail                       |
| /home/guy-kde/.local/share/local-mail/outbox    | outbox     | /home/guy-kde/.local/share/local-mail/outbox                          |
| /home/guy-kde/.local/share/local-mail/inbox/A/t | t          | /home/guy-kde/.local/share/local-mail/.inbox.directory/.A.directory/t |
| /home/guy-kde/.local/share/local-mail/inbox     | inbox      | /home/guy-kde/.local/share/local-mail/inbox                           |
| /home/guy-kde/.local/share/local-mail/inbox/B/t | t          | /home/guy-kde/.local/share/local-mail/.inbox.directory/.B.directory/t |
| /home/guy-kde/.local/share/local-mail           | local-mail | /home/guy-kde/.local/share/local-mail                                 |
| /home/guy-kde/.local/share/local-mail/inbox/A   | A          | /home/guy-kde/.local/share/local-mail/.inbox.directory/A              |
| /home/guy-kde/.local/share/local-mail/inbox/B   | B          | /home/guy-kde/.local/share/local-mail/.inbox.directory/B              |
+-------------------------------------------------+------------+-----------------------------------------------------------------------+
8 objects

The old line muss be removed.


Description
-------

As a folder-move doesn't modify the content of mMaildirsForCollection,
all the next operations with that folder get invalid:
- creating a new subfolder let it without a valid remoteId,
- moving a message to it create an entry at the pimitemtable, but
  not readable. The message appears little later again at the source folder.
This cannot be repaired. The new subfolder muss be deleted.

This doesn't occur if one closes kmail just after the move.

I propose to change the content of mMaildirsForCollection with:
- delete the entry
- insert a new one.

This is the solution to my questions at the mailing list:
- move message(s) doesn't work all the times, 11.12.2012 20:14
- some mails disappear, 19.12.2012 19:28

and from Wolfgang Rohdewald:
- moving mails between maildir directories, 20.01.2013 02:03


Diffs (updated)
-----

  resources/maildir/maildirresource.cpp 01a432f 

Diff: http://git.reviewboard.kde.org/r/108810/diff/


Testing
-------

Let say, we have two folders "A" and "B", and a subfolder "a1" under "A".

Open the akonadi console, enable the Debbugger and look at the lower window.
Now move the folder "a1" from "A" to "B".
One can see the green message:
Collection (24, a1) from collection 21 moved to collection 8

Now, click another folder to see the content, and click once more the
moved folder "a1".
One can see the red message:
AgentBase(akonadi_maildir_resource_0): Maildir '/home/guy-kde/.local/share/local-mail/.inbox.directory/a1' for collection 'a1' is invalid.


Thanks,

Guy Maurel

_______________________________________________
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