Closed Bug 1837137 Opened 1 years ago Closed 1 years ago

Emptying a local trash folder containing another folder causes problems for virtual folders

Categories

(MailNews Core :: General, defect)

defect

Tracking

(thunderbird115 fixed)

RESOLVED FIXED
116 Branch
Tracking Status
thunderbird115 --- fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(1 file)

This is quite similar to bug 528667, but there are more problems. They all happen when the local folders trash folder contains a deleted folder, and affect the unified folders trash virtual folder.

  • The removal of the deleted folder is not notified, so it is not removed from the virtual folder's search folders.
  • The removal and recreation of the real trash folder causes it to be removed from the virtual folder's search folders but not added back. This is because the deleted folder's URI is still in the list, and the trash folder's URI matches the start of that string. We're not checking for exact matches and we should be.
  • If the removal notifications are fixed (or if there had been messages but no deleted folder in the trash), emptying the trash causes the virtual folder to be removed. For user-created virtual folders this makes some kind of sense, but not for the unified folders. Especially in the case of the trash unified folder, which would have a folder to search again immediately.
  • Notifies nsIFolderListener listeners of all folders that get removed via
    nsMsgDBFolder::RecursiveDelete so they can properly be removed from virtual folders.
  • When a folder is created and should be added to a virtual folder, checks for an exact match of
    the URI in the virtual folder's searchFolderUri property.
  • If the last searched folder in a virtual folder is removed, keeps the virtual folder if it has a
    searchFolderFlag property value.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1128a563e54c
Fix problems with emptying the Local Folders trash and Unified Folders. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Flags: needinfo?(geoff)

Oh, the missing milestone meant it wasn't on my list. Go for it.

Flags: needinfo?(geoff)

Comment on attachment 9337820 [details]
Bug 1837137 - Fix problems with emptying the Local Folders trash and Unified Folders. r=#thunderbird-reviewers

[Approval Request Comment]
Should fix the test failure indicated in bug 1838067.

Attachment #9337820 - Flags: approval-comm-beta?

Comment on attachment 9337820 [details]
Bug 1837137 - Fix problems with emptying the Local Folders trash and Unified Folders. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta.

Attachment #9337820 - Flags: approval-comm-beta? → approval-comm-beta+
Regressions: 1839106
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: