Bug 303793 - emails lost when moving between folders
Summary: emails lost when moving between folders
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: folders (show other bugs)
Version: 4.8.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL: http://forum.kde.org/viewtopic.php?f=...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-19 13:03 UTC by net
Modified: 2012-08-24 17:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description net 2012-07-19 13:03:04 UTC
New to Linux and Kubuntu - I've only had it for a week.  This is my first bug report, please forgive me if I'm doing it wrong.

I setup my primary email address in Kmail. After downloading messages to the inbox for the first time, I decided I wanted to sort them into subfolders inside the inbox. So far so good. Then I changed my mind and tried to move the folders outside the inbox. I created a new folder outside the inbox, then tried to move all the folders in the inbox to the new folder.

Kmail crashed, and when I opened it again, whenever I tried to open one of my folders it said "Local Folders: MailDir (subfolderName) for collection (collectionName) is invalid." I could still see the emails, but I was annoyed at the constant error messages, so I tried to create more new directories and move the emails out into new directories.

When I did so, the emails disappeared from the old directory, but didn't arrive at the new directory! Now I was getting angry. Where'd my emails go? I started manually looking in hidden directories (such as the one listed in the error message), but those were all empty. I finally found them inside Home>.local>share>local-mail>.inbox.directory>(subfolder) ... which is where they started?

The emails are all there. I can open them (using Dolphin) with Kmail Viewer. I can see them in Kmail, but I can't open them, and if I try to move them in Kmail they get lost, which is scary. I don't want to lose those emails! Some of them are important.

I've noticed the problem is that when I try to open the folder the error says it can't find the subfolder.  However, the subfolder listed is different from the actual location of the emails on my computer.

For instance the emails are at:
Home>.local>share>local-mail>.inbox.directory>(subfolder)
But it tries to find them at:
Home>.local>share>local-mail>.inbox.directory>(subfolder)>(subfolder)

I fixed the problem by creating a new folder in Kmail, then manually copying the emails (using Dolphin) from the directory where they are to the new directory. Now I can see all my emails in Kmail in the new folder, and I can move them without problems, and I feel confident deleting the old folders. Even so, I'm gonna back up before I do...

Reproducible: Didn't try

Steps to Reproduce:
The effect was scary, so I did not want to try to reproduce it.


Expected Results:  
If it crashes while moving folders it needs to keep the structure in a safe state.

If a folder is invalid, there needs to be a way for the user to intervene to correct the address of the folder.

If it moves emails from an invalid folder, it must not lose those emails!  For safety, if it can't move them, then it shouldn't try.

If the folders are listed in the folder structure, there should be some way to "clean up" the folders so it knows where they all are again.

Because I was able to find the emails and move them manually (using Dolphin), data was not lost.  However, it's still a very scary error.  For someone that isn't computer literate (and couldn't fix it themselves), they'd probably never touch Kmail again.
Comment 1 Laurent Montel 2012-07-19 14:32:12 UTC
We fixed dnd bug in 4.9
So it will not crash
And dnd move in akonadi was fixed in 4.9 too.