Closed Bug 1700575 Opened 3 years ago Closed 3 years ago

Cannot attach files of size 0 bytes

Categories

(Thunderbird :: Message Compose Window, enhancement)

enhancement

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: alexandernaumann, Unassigned)

References

(Regression)

Details

Attachments

(1 file)

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

Steps to reproduce:

I wanted to send a bunch of files that are all empty

Actual results:

Thunderbird said that it cannot send or save this composed mail with these attachments and want them to be removed.

Expected results:

Should be able to send empty files

Thunderbird said that it cannot send or save this composed mail with these attachments and want them to be removed.

Please attach a screen shot to the bug report (button above your first comment)

Flags: needinfo?(alexandernaumann)
Flags: needinfo?(alexandernaumann)

I can confirm this bug for TB78.9
With TB-trunk and the Pref: mailnews.send.jsmodule set to FALSE I see the same as with TB78.
But with Pref: mailnews.send.jsmodule=TRUE it works for me.

See bug 453196 fixed in TB 45. Since then you couldn't send empty files. Looks like it's now possible with the JS send.

(In reply to José M. Muñoz from comment #4)

See bug 453196 fixed in TB 45. Since then you couldn't send empty files.

Indeed:
https://searchfox.org/comm-central/rev/3395bfb7b37aa9635500b6d4684be41759f7911d/mailnews/compose/src/nsMsgAttachmentHandler.cpp#970

This is from bug 453196. Which then generates the error message here:

https://searchfox.org/comm-central/rev/3395bfb7b37aa9635500b6d4684be41759f7911d/mailnews/compose/src/nsMsgAttachmentHandler.cpp#1011

So WANTFIX or WONTFIX?

Looks like it's now possible with the JS send.

Which means one version is wrong.

Regressed by: 453196
See Also: → 1211292

So WANTFIX or WONTFIX?

Neither. If you look carefully at bug 453196, you'll see that reacting to an empty file was a hack to detect an error condition when attaching the file. IMHO this bug here is a WORKS-FOR-ME since it works now in the new implementation. Since TB 52 (sorry, comment #4 was wrong, it never made it into TB 45) no one has complained, so not being able to attach an empty file is no drama.

Note that checking for zero length has returned for error detection for message attachments in bug 1701741.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME

(In reply to José M. Muñoz from comment #6)

So WANTFIX or WONTFIX?

Neither. If you look carefully at bug 453196, you'll see that reacting to an empty file was a hack to detect an error condition when attaching the file. IMHO this bug here is a WORKS-FOR-ME since it works now in the new implementation. Since TB 52 (sorry, comment #4 was wrong, it never made it into TB 45) no one has complained,

So WONTFIX. Because attaching an empty file really doesn't work.

so not being able to attach an empty file is no drama.

Yes, flag files are certainly a rare occurrence. And usually you put such a collection in an archive. But normal users don't care about such details. And it's surprising to them that it doesn't work. Especially since they don't get a clear error message.

Note that checking for zero length has returned for error detection for message attachments in bug 1701741.

Right. My trunk build was too old. In the current daily, it no longer works with the jsmodule either.

Just my (1(1¢)

So WONTFIX. Because attaching an empty file really doesn't work.

Well, we were assuming that it did work after what you wrote in comment #3. In this case, WFM is correct since the issue is fixed in the current (trunk) version and will therefore be fixed in the next ESR version. We already established that making TB 78 work is impossible since zero-length is interpreted as attaching error there.

If now it turns out that the current (trunk) version you can't attach zero-length files, then the bug needs to be reopened and some decision needs to be taken. I haven't tried myself, but I'm surprised that it doesn't work any more since bug 1701741 was explicitly about message attachments, see: https://hg.mozilla.org/comm-central/rev/93069fd861c5#l1.48

Flags: needinfo?(remotenonsense)
Flags: needinfo?(mkmelin+mozilla)

Thanks José, https://hg.mozilla.org/comm-central/rev/93069fd861c5#l1.12 should be let isMessage = false, I will send a patch to bug 1701741.

Flags: needinfo?(remotenonsense)
Flags: needinfo?(mkmelin+mozilla)

(In reply to Ping Chen (:rnons) from comment #9)

Thanks José, https://hg.mozilla.org/comm-central/rev/93069fd861c5#l1.12 should be let isMessage = false, I will send a patch to bug 1701741.

Append works again with jsmodule on current Daily.

But - I still can't save such an attachment. 🤔😂
This was also OK on TB78.7.1

Can you clarify this a bit please. What was "OK on TB 78"? Haven't we established that empty attachments couldn't be sent with TB 78? So did you send it with Daily and then try to save it with TB 78? And that worked but doesn't work any more in Daily? I guess this needs another bug to not further confuse this one.

Curious - Currently I can no longer reproduce it.
This morning all Items of the attachment context menu were grayed out.
Sorry for the noise.

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

Attachment

General

Created:
Updated:
Size: