Version: unspecified (using Devel) OS: Linux Deleting a folder that contain a subfolder as well as the emails they contain does not seem to work atm. Reproducible: Always Steps to Reproduce: - Launch Kmail-mobile - Click on your Imap inbox - Select an already existing folder containing two emails (ex Folder 2) and copy it into another one also containing 2 emails (ex: folder 1) still within the Imap inbox - Select folder 1 - Open the 'Actions' tab - Click on 'Edit' - Click on 'Delete folder' - A 'Delete folder?' pop up message appears asking: 'Do you really want to delete this folder and all its sub-folders?' - Click on 'Delete' - the Folder view goes back to the Imap server name - Click on your Imap inbox Actual Results: Folder 1 is still displayed but does not contain any email anymore. Its subfolder (Folder 2) is still displayed too and still contains both its emails. Expected Results: Both Folder 1 and 2 as well as their emails should be properly deleted. Note: if 'Folder 2' does not display any email after deleting 'Folder 1' try quitting and then relaunching Kmail-mobile. N900, 4:4.6~20101026.1190044-1maemo1.1189579
*** Bug 253240 has been marked as a duplicate of this bug. ***
This is a problem of the Akonadi server, which does not send remote ids for the anchestor hierarchy. Therefor resources with hierarchical remote identifiers (e.g. the imap resource) can't find the object to delete in the backend. @Volker any idea how to fix this?
Created attachment 54539 [details] Patch that fixes recursive folder deletion This patch introduces a new class RemoveCollectionRecursiveTask, which deletes a complete folder hierarchy recursively. The resource ignores now itemRemoved()/collectionRemoved() calls for items/collections with parent collections without remote identifier and does a recursive deletion of the uppermost collection to remove.
SVN commit 1208084 by tokoe: Delete a collection recursive Since Akonadi server does not support hierarchical remote identifiers in delete notifications, we have to ignore the notifications for child collections/items and remove the requested imap folder recursivly on the IMAP server. BUG: 255465 M +1 -0 CMakeLists.txt M +18 -1 imapresource.cpp A removecollectionrecursivetask.cpp [License: LGPL (v2+)] A removecollectionrecursivetask.h [License: LGPL (v2+)] M +112 -0 tests/testremovecollectiontask.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1208084
My revision is not recent enough to test this bug so I'll retest it later this week. N900,4:4.6~20101220.1208001-1maemo1.1206430
Could not retest today due to a regression (see bug #261006) N900, 4:4.6~20101222.1208531-1maemo1.1208558
It is corrected now. Both the folder and its subfolder are deleted properly as well as their emails so I am closing this bug. N900, 4:4.6~.20101223.2034.git9cc0c3e-1maemo1.120883