Firefox 3 silently fails to write downloaded files

VERIFIED DUPLICATE of bug 429827

Status

()

Toolkit
Downloads API
VERIFIED DUPLICATE of bug 429827
10 years ago
10 years ago

People

(Reporter: Olivier Fourdan, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092416 Firefox/3.0.3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092416 Firefox/3.0.3

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:


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]


Reproducible: Always

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.


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

Comment 1

10 years ago
Created attachment 346056 [details] [diff] [review]
Proposed patch to fix the issue
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 429827
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #346056 - Flags: review?(gavin.sharp)
Component: General → Download Manager
Product: Firefox → Toolkit
QA Contact: general → download.manager
Version: unspecified → Trunk
Bug 429827 should have fixed this.
Status: NEW → RESOLVED
Last Resolved: 10 years ago10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 429827
Attachment #346056 - Flags: review?(gavin.sharp)
Thanks for the patch anyways, though, Olivier!
Verified dup
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.