[Kde-pim] Re: the path was never set before

Kevin Krammer kevin.krammer at gmx.at
Thu Jun 30 19:28:25 BST 2011


On Thursday, 2011-06-30, Guy Maurel wrote:
> Hello Kevin!
> 
> On Wednesday, June 29, 2011 07:41:29 PM Kevin Krammer wrote:
> > Hi Guy,
> > 
> > On Wednesday, 2011-06-29, Guy Maurel wrote:

> > > I mean, the path was *never* set before, the return will be all the
> > > time "false".
> > 
> > Indeed, it is always false on first start because the resource has not
> > been configured yet.
> > It will always be true once it has been configured and the file system
> > wasn't changed (e.g. path moved or removed)
> 
> BUT, the migration runs only ONCE there!

I am not entirely sure what you mean by this.
The migration is run only once. It creates the mixed maildir resource and 
configures the path it read from the KMail config (or using the default if the 
config entry General/folders is empty.

Lets step this through:
1) the migrator reads the path of the kmail mail tree root from the config, 
method migrateLocalFolders()
if the path is valid, it requests creation of a mixed_maildir resource

2) when this request returns in method localMaildirCreated() it creates a 
couple of KMail2 config entries for controlling KMail's behavior regarding the 
resource

3) it then checks if there is a special mail collections resource configured 
(usually there is one because Akonadi's startup has activated mail dispatcher 
agent which will have created a maildir resource for that purpose).
If not (as I said this is unlikely) it configures the newly created mixed mode 
resource for these tasks.

4) then it runs the collection migrator for the local folders tree, which will 
modify filters to point to collection IDs instead of paths, set attributes on 
certain collections (inbox, trash, etc) and so on

5) this completes in method localFoldersMigrationFinished() where the migrator 
obtains the resource's D-Bus configuration interface and configures the path 
it has read from the config before and also used for the collection migrator 
run

At this stage the mixed maildir resource will successfully pass its 
ensureSaneConfiguration() check

6) finally it checks on special mail collections take-over, i.e. making itself 
the resource for outbox/sent-mail/etc even if there is a maildir resource 
configured for that task. Take-over depends on this resource being empty, i.e. 
having been created by mail dispatcher but not having been used yet.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- 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/20110630/1f7a78cb/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