resource and itemMoved()

Daniel Vrátil dvratil at kde.org
Mon Apr 9 09:09:25 BST 2018


Hi Martin,


On Saturday, 7 April 2018 14:36:35 CEST Martin Koller wrote:
> There is the method itemMoved() in a resource.
> As the name suggest, I assume this is called AFTER the akonadi server
> already changed the database entries, right ?

Correct.

> 
> What happens when the resource can not finish the real move on the storage ?
> In my case, maildir, itemMoved() fails due to an already existing file with
> the same name in the destination folder, and it calls cancelTask().
> 
> In which state is the database after this failure ?

The database is "wrong" for a while, but the email still exists in the maildir 
in the old location, so in the next sync the email should reappear in the 
original folder.

> In my case I find in the mySQL db only ONE entry with this remoteId in the
> final folder. So the mail file is still on disk in my inbox but it's not in
> the DB.

That's the expected inconsistency after the move but before the sync.

Dan

-- 
Daniel Vrátil
www.dvratil.cz | dvratil at kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)

GPG Key: 0x4D69557AECB13683
Fingerprint: 0ABD FA55 A4E6 BEA9 9A83 EA97 4D69 557A ECB1 3683
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180409/c58fba9a/attachment.sig>


More information about the kde-pim mailing list