Closed
Bug 1467263
Opened 6 years ago
Closed 6 years ago
dragging an inaccessible file into compose attachments throws
Categories
(Thunderbird :: Message Compose Window, defect)
Thunderbird
Message Compose Window
Tracking
(thunderbird_esr60 fixed, thunderbird60 fixed, thunderbird61 wontfix, thunderbird62 fixed)
RESOLVED
FIXED
Thunderbird 62.0
People
(Reporter: aceman, Assigned: aceman)
Details
Attachments
(2 files)
1.98 KB,
patch
|
jorgk-bmo
:
review+
Paenglab
:
ui-review+
jorgk-bmo
:
approval-comm-beta+
jorgk-bmo
:
approval-comm-esr60+
|
Details | Diff | Splinter Review |
1.07 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
If you drag a file that will not be accessible to Thunderbird into its compose window attachment bucket, there will be just an exception at MsgComposeCommands.js, line 6080 (size = rawData.fileSize;) . This can happen e.g. if you run TB under one user in the OS, and drag the file from a file explorer under a different user. This is easy to do on Linux, but should also be reproducible on Windows/OS X.
This checks if the dragged file is readable to the app. Strangely, I got different results even when using the same file. At first (thus this bug) I got the exception about not being able to read the file size. But later on, TB added the attachment into the list. But it wasn't really readable and I got a complaint in a dialog when trying to save/send the message as that was the time TB was actually trying to read the file contents. Is this patch OK as it is, just adding a message into the console? I fix this to not abort with an exception in the middle of the envelopeDragObserver::onDrop() function. I wanted to catch this case and make the code continue, cleanly handling if the attachment isn't usable. So if it isn't no attachment is added to the list. This is similar as when you try to add the same attachment again. So this is why I need UI decision on this.
Attachment #8983931 -
Flags: ui-review?(richard.marti)
Attachment #8983931 -
Flags: review?(jorgk)
Comment 2•6 years ago
|
||
Comment on attachment 8983931 [details] [diff] [review] 1467263.patch Looks good. Thanks.
Attachment #8983931 -
Flags: review?(jorgk) → review+
Comment 3•6 years ago
|
||
Comment on attachment 8983931 [details] [diff] [review] 1467263.patch This is probably a very seldom case (it seems to be the first such bug report), so a console message is okay. And maybe you're planning to land it for TB 60 too where no new strings are allowed.
Attachment #8983931 -
Flags: ui-review?(richard.marti) → ui-review+
Updated•6 years ago
|
Keywords: checkin-needed
Updated•6 years ago
|
Attachment #8983931 -
Flags: approval-comm-esr60+
Attachment #8983931 -
Flags: approval-comm-beta+
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/25772af3b0a5 check if dragged file being attached is readable. r=jorgk, ui-r=Paenglab
Updated•6 years ago
|
Target Milestone: --- → Thunderbird 62.0
Sorry, a typo :(
Attachment #8984027 -
Flags: review?(jorgk)
Comment 6•6 years ago
|
||
Comment on attachment 8984027 [details] [diff] [review] 1467263-2.patch :-(
Attachment #8984027 -
Flags: review?(jorgk) → review+
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/ba8e0e2ddfda Follow-up: fix typo. r=jorgk DONTBUILD
Comment 8•6 years ago
|
||
TB 60 beta 7 (BETA_60_CONTINUATION branch): https://hg.mozilla.org/releases/comm-beta/rev/e422fdddc4b2dece61c512a96e2c7836091387ff (typo fix included here).
status-thunderbird60:
--- → fixed
status-thunderbird61:
--- → affected
status-thunderbird62:
--- → fixed
status-thunderbird_esr60:
--- → affected
You need to log in
before you can comment on or make changes to this bug.
Description
•