Last Comment Bug 723497 - saving message to disk fails silently, fails to report file naming convention violation error
: saving message to disk fails silently, fails to report file naming convention...
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Mail Window Front End (show other bugs)
: 10 Branch
: All All
: -- normal with 2 votes (vote)
: Thunderbird 21.0
Assigned To: Florian Maier
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-02 06:24 PST by Florian Maier
Modified: 2014-08-31 18:34 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
thunderbird-error-message-if-save-as-failed.patch (717 bytes, patch)
2012-02-02 06:24 PST, Florian Maier
mozilla: review+
Details | Diff | Splinter Review
new patch using NS_ENSURE_SUCCESS (1.27 KB, patch)
2013-01-02 05:10 PST, Florian Maier
mozilla: review+
Details | Diff | Splinter Review

Description Florian Maier 2012-02-02 06:24:54 PST
Created attachment 593817 [details] [diff] [review]
thunderbird-error-message-if-save-as-failed.patch

User Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0
Build ID: 20111104165243

Steps to reproduce:

Saving a message on a network share (or a local folder with insufficient space/permissions) does not result in an error message dpisplayed to the user. 

The error is not related to networking (in our case the CIFS kernel module reports the file naming convention violation error correctly), but to Thundbird not properly handling the error.

Attached is a patch which fixes the behaviour for Thunderbird 10 (lower versions should work, too). 


Actual results:

The bug can be reproduced in the following way:
* Open Thunderbird
* New E-Mail
* Subject "Re: Test" (the double dot ist important!)
* Save as Draft
* Change to "Drafts"
* Choose "Save as"
* Change to network path
* Save *.eml file (don't remove double dot's)
* Thunderbird shows no error, but did not save the message.

The result is an empty file with the filename "Re".

Bug 346003 may be related


Expected results:

* Open Thunderbird
* New E-Mail
* Subject "Re: Test" (the double dot ist important!)
* Save as Draft
* Change to "Drafts"
* Choose "Save as"
* Change to network path
* Save *.eml file (don't remove double dot's)
* Thunderbird shows an error "Message could not be saved!"
Comment 1 Magnus Melin 2012-02-02 23:15:03 PST
Florian, thx for the patch! Please ask bienvenu to review it.
https://developer.mozilla.org/En/Developer_Guide/How_to_Submit_a_Patch#Getting_the_patch_reviewed
Comment 2 Florian Maier 2012-02-03 03:37:54 PST
Thanks for the pointer! I am currently building trunk and will submit a patch against it afterwards (probably tomorrow).
Comment 3 Magnus Melin 2012-11-25 02:59:16 PST
Florian: any update?
Comment 4 Florian Maier 2012-12-06 02:08:28 PST
Hi Magnus, sorry for the late reply - i will definitely look into it next week and keep you updated.
Comment 5 Florian Maier 2012-12-13 05:23:44 PST
Comment on attachment 593817 [details] [diff] [review]
thunderbird-error-message-if-save-as-failed.patch

Sorry for the late reply. The issue still exists in TB 17. An empty file is created and no user visible error is thrown.
Comment 6 David :Bienvenu 2012-12-16 06:58:59 PST
Comment on attachment 593817 [details] [diff] [review]
thunderbird-error-message-if-save-as-failed.patch

looks reasonable, but you probably should use NS_ENSURE_SUCCESS(rv, rv);

I haven't had a chance to run the xpcshell tests - have you done that?
Comment 7 David :Bienvenu 2012-12-16 07:00:53 PST
Comment on attachment 593817 [details] [diff] [review]
thunderbird-error-message-if-save-as-failed.patch

and for checkin, you should attach a hg diff, to make it easier for someone to land this for you.
Comment 8 Florian Maier 2013-01-02 05:10:50 PST
Created attachment 696992 [details] [diff] [review]
new patch using NS_ENSURE_SUCCESS

Tested today, applied against current trunk. Please let me know if you need anything else.
Comment 9 Ryan VanderMeulen [:RyanVM] 2013-01-12 05:07:51 PST
https://hg.mozilla.org/comm-central/rev/10f6596aa49a

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