Closed Bug 1547664 Opened 6 years ago Closed 6 years ago

"File > Empty Trash" incorrectly displays "Empty <current folder>" in confirmation dialog title

Categories

(Thunderbird :: Folder and Message Lists, defect)

defect
Not set
normal

Tracking

(thunderbird_esr6068+ fixed, thunderbird67 fixed, thunderbird68 fixed)

RESOLVED FIXED
Thunderbird 68.0
Tracking Status
thunderbird_esr60 68+ fixed
thunderbird67 --- fixed
thunderbird68 --- fixed

People

(Reporter: olivier, Assigned: aceman)

Details

Attachments

(2 files)

Attached image tb-empty-trash.png

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/74.0.3729.108 Chrome/74.0.3729.108 Safari/537.36

Steps to reproduce:

(originally reported at https://support.mozilla.org/en-US/questions/1254659 but it's not an Ubuntu-specific issue as replies in that thread seem to imply)

  1. Select any folder under any account in the left pane (e.g. a folder named "Foo Bar")
  2. Open the file menu and click "Empty Trash"
  3. Observe that a confirmation dialog is displayed ("Delete all messages and subfolders in the Trash folder?")

Actual results:

The title of the dialog reads 'Empty "Foo Bar"'.

Expected results:

The title of the dialog should be 'Empty Trash'.

Flags: needinfo?(acelists)

And which folder does it actually empty?
I think we did this, because we also use this to empty the junk folder. But the context menu item to empty Junk or Trash shows only on the Junk and Trash folders. Not that this main menu item is active on any folder, but picks up the name of the current folder (but this one won't be emptied), this would be a bug.

Flags: needinfo?(acelists)
Assignee: nobody → acelists
Status: UNCONFIRMED → ASSIGNED
Component: Untriaged → Folder and Message Lists
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All

There is already a note about this weirdness in the code: https://searchfox.org/comm-central/source/mail/base/content/folderPane.js#2651 :)

Attached patch 1547664.patchSplinter Review

Note that folder.emptyTrash() will look for a real trash folder anyway (server type dependent), it will not empty 'folder' unconditionally. So at least try to look for some real trash folder in the confirmation prompt.

Attachment #9062698 - Flags: review?(jorgk)
Comment on attachment 9062698 [details] [diff] [review] 1547664.patch Review of attachment 9062698 [details] [diff] [review]: ----------------------------------------------------------------- Works for me, thanks. ::: mail/base/content/folderPane.js @@ +2646,5 @@ > /** > * Prompts the user to confirm and empties the trash for the selected folder. > * The folder and its children are only emptied if it has the proper Trash flag. > * > + * @param aFolder (optional) The trash folder to empty. If unspecified, the If unspecified? Did you want to say "if unspecified or not a trash folder"?
Attachment #9062698 - Flags: review?(jorgk) → review+
Attachment #9062698 - Flags: approval-comm-esr60?
Attachment #9062698 - Flags: approval-comm-beta+

Yes.

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/7e7a8c180b0c
Ask for confirmation on the real trash folder if a non-trash folder was selected. r=jorgk

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 68.0
Attachment #9062698 - Flags: approval-comm-esr60? → approval-comm-esr60+

Well, that patch doesn't apply to comm-esr60 at all.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: