Bug 155910 - mail folder management: old contents blocks changes (major; potential data loss)
Summary: mail folder management: old contents blocks changes (major; potential data loss)
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-01-16 14:17 UTC by Maciej Pilichowski
Modified: 2009-04-11 13:09 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 Maciej Pilichowski 2008-01-16 14:17:23 UTC
Version:            (using KDE 3.5.8)
Installed from:    SuSE RPMs

This bug is serious however if user won't panic it is possible to recover from KMail error.

Let's say we have A folder with B, C, D subfolder. We work for a while, KMail stores some data, like indices for those subfolders. Then we delete D.

Some time later we create _A folder with B and C, we move all from B and from C (to B and C in _A). Delete A, rename _A to A.

KMail restart and... B and C are gone. What happened? There was some date about D not deleted from A (on the disk) so A was deleted from KMail but not from disk. Since it was not deleted, rename _A -> A was possible but without B and C (they left in _A structure).

So there are several bugs here:
* KMail keeps some leftovers from deleted subfolders
* KMail does not check if rename is possible
* KMail does not warn about problems with rename
* KMail does not check the integrity of the data (on start at least)

Workaround:
* do not panic
* quit KMail
* find A directory in KMail (on disk)
* delete it
* rename _A directory (containing B and C) to A
* run KMail -- you should be able to see correct A folder with B and C subfolders
Comment 1 Jaime Torres 2009-04-04 10:43:39 UTC
Using kmail 1.11.90 (opensuse kde 4.2.68). I've followed your detailed steps, and those are my good results.
The four points:
* The folders keep their respective mail.
* kmail checks if rename is possible. (it shows a warning saying there is an existing folder with that name and does nothing).
* same as previous
* The folders have their respective mail.

So this looks fixed.
Comment 2 Dominik Tritscher 2009-04-11 13:09:13 UTC
I also tried to reproduce that bug by following the steps described in the initial report. Everything worked fine here, no data loss, everything is as it should be. So I'm closing this bug.