Closed Bug 1761973 Opened 2 years ago Closed 2 years ago

detached attachments opened from temporary folder - should open the file directly

Categories

(Thunderbird :: Message Reader UI, defect)

Thunderbird 91
defect

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
101 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: oliver.brendel, Assigned: leftmostcat, Mentored)

References

Details

Attachments

(4 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0

Steps to reproduce:

Opened an email with an attachment, right clicked on the attachment, chose "detach", saved in a local folder (C:\Users\xxx\Documents\docs\Divers); clicked OK for detach warning; clicked atain right on the attachment, chose "Open", the Open File window shows the correct folder path in which the file has been saved; then opened the file, here in LibreOffice; checked file properties : the file path is "C:\Users\xxx\AppData\Local\Temp\pid-13948"

Actual results:

The file has been saved in the destination folder (I have checked that), but when opened from within TB, it will be opened from a TB temporary folder. The user is normally not aware of this, so when he will save changes, close the file and then reopen the file from the destination folder, the changes will have disappeared (as he did not open the file from the temporary folder). I have checked this with different external programs and file formats, always the same.

Expected results:

When a file is detached to a destination folder, and then opened from within TB, it should open in the external program from the destination folder.
This is really a dangerous buck for users, who might easily loose data and hours of work. In older versions of TB this did work correctly.

(In reply to brendel oliver from comment #0)

Created attachment 9269858 [details]
the folder path shown in the external programm once the attachment has been opened

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0

Steps to reproduce:

Opened an email with an attachment, right clicked on the attachment, chose "detach", saved in a local folder (C:\Users\xxx\Documents\docs\Divers); clicked OK for detach warning; clicked again right on the attachment, chose "Open", the Open File window shows the correct folder path in which the file has been saved; then opened the file, here in LibreOffice; checked file properties : the file path is "C:\Users\xxx\AppData\Local\Temp\pid-13948"

Actual results:

The file has been saved in the destination folder (I have checked that), but when opened from within TB in an external programm, it will be opened from a TB temporary folder. The user is normally not aware of this, so when he will save changes, they will be saved in a file created in the temporary folder. If the user then closes the file and then reopen the file using the external programm from the destination folder, the changes will have disappeared (as he did not open the file from the temporary folder). I have checked this with different external programs and file formats, always the same.

Expected results:

When a file is detached to a destination folder, and then opened from within TB, it should open in the external program from the destination folder.
This is really a dangerous bug for users, who might easily loose data and hours of work. In older versions of TB this did work correctly.

this is linked to https://bugzilla.mozilla.org/show_bug.cgi?id=1760971 which I also reported, but which includes a change in the file name.

https://searchfox.org/comm-central/rev/5291585b93fbe295bd46ebbfebb0276cffec9e4e/mail/base/content/msgHdrView.js#2248

Should probably do something like

if (this.isFileAttachment) 
 this._openTemporaryFile(....)
else

Sean, maybe you can look at this?

Assignee: nobody → leftmostcat
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 1760971
Summary: detached attachments opened from temporary folder → detached attachments opened from temporary folder - should open the file directly
Mentor: mkmelin+mozilla

Just updated to 91.8.0, still the same problem.

Status: NEW → ASSIGNED
Target Milestone: --- → 101 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/34c108acf91a
clarify naming in open attachment tests. r=mkmelin
https://hg.mozilla.org/comm-central/rev/d0347a62229e
open detached attachments from location on disk. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

In case you backport this to TB 91, please note this additional code is needed:
https://github.com/Betterbird/thunderbird-patches/blob/4c68786505fd1d18f00a40022e33e816f63a95bc/91/bugs/1761973-open-detached-attachments-from-location-on-disk.patch#L136
In Mozilla 91, launchLocalFile() didn't exist, it was introduced here:
https://hg.mozilla.org/releases/mozilla-beta/rev/5457a9293dbb#l5.17, bug 1750042, Mozilla 98.

Regressions: 1766177

We're not planning to backport this to 91. 101 beta will be out next week and 102ESR in 2 months, so it's not worth it.

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

Attachment

General

Creator:
Created:
Updated:
Size: