Bug 279722 - Copying Mails from mixedmaildir resource to maildir resource only copies their headers
Summary: Copying Mails from mixedmaildir resource to maildir resource only copies thei...
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.7
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-09 10:22 UTC by Christoph Drexler
Modified: 2011-09-29 20:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Drexler 2011-08-09 10:22:29 UTC
Version:           4.7 (using KDE 4.7.0) 
OS:                Linux

I have two akonady resources: a mixedmaildir resource pointing to
~/.kde4/apps/kmail/mail and a maildir resource pointing to
~/.local/share/local-mail (the first one being my backup, the second one my storage for local mails)

Due to mail loss I recently had copy a lot of mails from the mixedmaildir resource to the maildir resource.

When I copy a mailfolder by drag and drop within kmail, it seems that the folder and the mails in the folder are being copied as expected, but when I try to open one of the mails, only the mail header (From:, To:, Subject: and so on) will be showed, but no content.

Looking for the mails in the filesystem (in one of the subfoders of ~/.local/share/.local-mail.directory/), I see that actually only the mailheaders have been copied.

Strangely enough, this only "works" if the mails to be copied are selected automatically, either by copying a whole folder or by using Ctrl-A. If the mails are selected manually one-by-one, they are copied as expected.

Even more strangely, when I delete the copied messages and then copy them again, this time it works as expected (the whole mails including their content are copied).

This is reproducible on my system, even after restarting the computer: Copying the mails, the first time only the headers are copied, afterwards the whole mail is copied.

As this bug potentially causes data loss (when moving the mails instead of copying), I consider this a severe bug.

Reproducible: Always

Steps to Reproduce:
1. Create a mixedmaildir resource pointing to an existing kmail mail folder.
2. Create a maildir resource pointing to e.g. ~/.local/share/local-mail
3. In Kmail, Automatically select a bunch of mails in the mixedmaildir resource, either by selecting a folder or by using Ctrl-A
4. Drag-and-drop the mails to the maildir resource, selecting "copy"
5. Select one of the copied mails in the maildir resource

Actual Results:  
Only the mails' headers will be shown.

Expected Results:  
The whole mails should be copied, not only their headers.
Comment 1 Laurent Montel 2011-08-09 12:46:45 UTC
I confirm it.
it's an akonadi pb not a kmail problem
Comment 2 Christoph Drexler 2011-08-09 13:31:20 UTC
Thanks for your confirmation.
Can you move the bug to the akonadi bugs, or do I have to report it again as an akonadi bug?
Comment 3 Laurent Montel 2011-08-09 13:41:57 UTC
move to akonadi
Comment 4 András Manţia 2011-09-29 20:31:22 UTC
Git commit 9d1da9403d64f41baed701817fc44e6a54e3c6ad by Andras Mantia.
Committed on 29/09/2011 at 22:29.
Pushed by amantia into branch 'master'.

Temporary workaround for data loss on copy/move bugs.
BUG: 281552
BUG: 279722
FIXED-IN: 4.8

M  +6    -0    akonadi/pastehelper.cpp

http://commits.kde.org/kdepimlibs/9d1da9403d64f41baed701817fc44e6a54e3c6ad
Comment 5 András Manţia 2011-09-29 20:33:19 UTC
Git commit 5b7322266992bf4ddace45c47d711fd77da737dc by Andras Mantia.
Committed on 29/09/2011 at 22:33.
Pushed by amantia into branch 'KDE/4.7'.

Temporary workaround for data loss on copy/move bugs.
BUG: 281552
BUG: 279722
FIXED-IN: 4.7.2
(cherry picked from commit 9d1da9403d64f41baed701817fc44e6a54e3c6ad)

M  +6    -0    akonadi/pastehelper.cpp

http://commits.kde.org/kdepimlibs/5b7322266992bf4ddace45c47d711fd77da737dc