Bug 684926

Summary: Firefox 3 silently fails to write downloaded files
Product: Red Hat Enterprise Linux 6 Reporter: J.H.M. Dassen (Ray) <rdassen>
Component: xulrunnerAssignee: Christopher Aillon <caillon>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: cmeadors, jhird, jrb, jwest, ofourdan, plyons, rbinkhor, syeghiay, tpelka, vbenes
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 466469 Environment:
Last Closed: 2012-06-25 20:35:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 509156    
Bug Blocks: 466469, 756082    

Description J.H.M. Dassen (Ray) 2011-03-14 20:04:15 UTC
+++ This bug was initially created as a clone of Bug #466469 +++

Created attachment 320012 [details]
Proposed patch to fix the issue

Description of problem:

When saving a file to a non user writable directory, Firefox 3 give no notification to the user but an exception error in the log:

Version-Release number of selected component (if applicable):

firefox-3.0.1

The problem is also still present in upstream built.

How reproducible:

100% reproducible

Steps to Reproduce:
1. Download a file
2. Use "Save to disk" instead of "Open with"
3. Select a destination directory that is not writable to the user
  
Actual results:

There is no notification of failure to the user but a message in the console (if FF3 was started from a terminal):

*** exception in validateLeafName: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.create]"  nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)"  location: "JS frame :: file:///usr/lib/xulrunner-1.9/components/nsHelperAppDlg.js :: anonymous :: line 271"  data: no]

Expected results:

A dialog box notifying that the file was not saved.

Additional info:

The problem is also present upstream and I did not find a bug report about this on mozilla.org.

The fix is actually fairly simple, in "nsHelperAppDlg.js", the call to aLocalFile.create() must be protected by a try/catch.

The proposed patch attached gives the expected result. Note: I can open a BZ upstream to get the fix upstream too if that helps, just let me know.

--- Additional comment from mcepl on 2008-11-03 11:53:10 EST ---

Please file a bug report in the the upstream bugzilla located at http://bugzilla.mozilla.org in the particular component. Given that you are providing the patch, it would be probably really better, if you were in the direct contact with upstream.

Once you've filed your bug report to the upstream bugzilla, if you paste the new bug URL here, Red Hat will continue to track the issue in the centralized upstream bug tracker, and will review any bug fixes that become available for consideration in future updates.

Setting status to NEEDINFO, and awaiting upstream bug report URL for tracking.

Thanks in advance.

--- Additional comment from ofourdan on 2008-11-03 12:27:23 EST ---

Bugzilla upstream created - I've also updated the external bug field, copying hthe URL here for completion:

https://bugzilla.mozilla.org/show_bug.cgi?id=462869

Cheers,
Olivier.

--- Additional comment from mcepl on 2008-11-04 12:06:54 EST ---

Closing as UPSTREAM.

--- Additional comment from pm-rhel on 2010-05-20 08:48:27 EDT ---

This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

--- Additional comment from jhird on 2011-03-14 06:37:21 EDT ---

=== In Red Hat Customer Portal Case 00323461 ===
--- Comment by Hird, Jason on 14/03/2011 10:37 ---

Client suggesting that this might be better fixed in RHEL6 now rather than RHEL5, can we amend this bz to align with a fix in RHEL6 instead please?

Regards

Jason

Comment 2 J.H.M. Dassen (Ray) 2011-03-14 20:11:13 UTC
Cloned and adjusted to request evaluation for a fix for RHEL6.