Closed Bug 270557 Opened 20 years ago Closed 19 years ago

downloads fail silently if the default download path is invalid, e.g. leads to a removed drive

Categories

(Toolkit :: Downloads API, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.8final

People

(Reporter: mbohnen, Assigned: son.le0)

References

Details

(Keywords: dataloss)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0

I removed a harddisk from my PC, (Drive E:), but i forgot to change the the
default download path in Firefox from "E:" to something else. Then, when I
downloaded something, Firefox would download all data (to a temporary file i
guess) but then the download would fail at 99%. Thats quiet annoying if you just
downloaded a few hundred megabyte. And removable drives like USB-Sticks get more
and more popular, so i guess more people will experience this prolem.

What I don't like about Firefox' behaviour: 
1. Firefox should give the user an error message explaining his problem with the
download. 
2. If the default download path is not existant, Firefox should save the
download to an default-default download path, e.g. "Desktop" AND tell the user
about the new download path.

Reproducible: Always
Steps to Reproduce:
1. Create a temporary drive on your PC, for example with an USB-Stick.
2. Start Firefox and change the default download path to that drive.
3. Remove the USB-Stick 
4. Start Firefox and try to download something. 

Actual Results:  
The download fails

Expected Results:  
The download should be saved somewhere else
I can confirm this behaviour - There is no error message from Firefox if the
target drive/path does not exist / is invalid. There must be an error message -
or the user is left believing the download succeeded.
Summary: Downloads fail if the default download path is invalid, e.g. leads to a removed drive → Downloads fail if the default download path is invalid, e.g. leads to a removed drive
Severity: minor → critical
Keywords: dataloss
Summary: Downloads fail if the default download path is invalid, e.g. leads to a removed drive → Downloads fail silently if the default download path is invalid, e.g. leads to a removed drive
*** Bug 277157 has been marked as a duplicate of this bug. ***
I can confirm this bug, as the same thing happened to me. For more info, please see 
http://www.moztips.com/index.php?id=435
first bugzilla bit, sorry if in wrong place:  i can confirm the error as well,
with an invalid path set as your download location firefox fails silently. 
should warn perhaps or force new target location to be set.  download manager
does not even pop up.
Severity: critical → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Downloads fail silently if the default download path is invalid, e.g. leads to a removed drive → downloads fail silently if the default download path is invalid, e.g. leads to a removed drive
Version: unspecified → Trunk
*** Bug 240987 has been marked as a duplicate of this bug. ***
Flags: blocking-aviary1.1?
Flags: blocking-aviary1.1? → blocking-aviary1.1+
->mconnor
Assignee: bugs → mconnor
*** Bug 299034 has been marked as a duplicate of this bug. ***
if default download path is invalid, save to the desktop instead.
Attachment #190936 - Flags: review?(mconnor)
*** Bug 258222 has been marked as a duplicate of this bug. ***
Comment on attachment 190936 [details] [diff] [review]
save to desktop if download path is invalid

this is the wrong fix.	If the previous block took case 0 and failed, you don't
fix the bug.

The right fix is to add an exists() check to the validateLeafName function, so
instead of:

if (!aLocalFile)
  return null;

you have

if (!aLocalFile || !aLocalFile.exists())
  return null;

which forces up the filepicker and lets the user pick something valid.
Attachment #190936 - Flags: review?(mconnor) → review-
Attached patch the right fixSplinter Review
I thought everyone has some kind of a 'desktop' folder as default.
Attachment #190936 - Attachment is obsolete: true
Attachment #191152 - Flags: review?(mconnor)
Comment on attachment 191152 [details] [diff] [review]
the right fix

In theory, they do, but its possible for this to fail and we need to fall back
properly and consistently.
Attachment #191152 - Flags: review?(mconnor)
Attachment #191152 - Flags: review+
Attachment #191152 - Flags: approval1.8b4+
*** Bug 303337 has been marked as a duplicate of this bug. ***
If someone can check this in for me it would be terrific.
Assignee: mconnor → son.le0
Target Milestone: --- → Firefox1.1
Checking in nsHelperAppDlg.js.in;
/cvsroot/mozilla/toolkit/mozapps/downloads/src/nsHelperAppDlg.js.in,v  <-- 
nsHelperAppDlg.js.in
new revision: 1.32; previous revision: 1.31
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 316106 has been marked as a duplicate of this bug. ***
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: