Download Manager silently overwrites files (doesn't prompt or number files) when left clicking link

RESOLVED FIXED in mozilla1.6



15 years ago
11 years ago


(Reporter: mysterioususer, Assigned: bugs)


({dataloss, regression})

dataloss, regression

Firefox Tracking Flags

(Not tracked)




15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031201 Firebird/0.7+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031201 Firebird/0.7+

When setting Mozilla Firebird to automatically save files in a certain folder
(eg Desktop or Downloads), it should not automatically overwrite files if a file
with the same file name already exists.  I tested this by downloading MozillaFB
nightlies, which never have different file names (

Reproducible: Always

Steps to Reproduce:
1. Make sure Download manager is set to "save all files in this folder"
2. Download a file that has the same name as a file that already exists in said
folder (try

Actual Results:  
Firebird doesn't prompt whether or not the file should be overwritten.

Expected Results:  
A small dialog box should come up to say something to the effect of "A file by
that name already exists.  Overwrite?"

It appears that if you ask firebird to prompt you where to download each
individual file, then it does indeed ask whether or not it should overwrite
(this may be more of a function of Windows than of Firebird though)

Comment 1

15 years ago
I can confirm this on Windows and Linux 2003-12-02. Am upping to critical since
unintended data loss can occur.
Severity: minor → critical
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All

Comment 2

15 years ago
*** Bug 226177 has been marked as a duplicate of this bug. ***


15 years ago
Keywords: dataloss

Comment 3

15 years ago
1) Firebird overwrites instead of appending -1, -2.
This is a behavior change.  We need to determine if this happened with the new
Download Manager.
2) Firebird doesn't ask if it should overwrite. 
That should be a seperate bug.
It should be doing the -1, -2 thing. ->me, 0.8
Assignee: blake → bugs
Priority: -- → P2
Target Milestone: --- → Firebird0.8

Comment 5

15 years ago
Prompt vs append numbers -> bug 227343
Summary: Download Manager should prompt if overwriting files → Download Manager silently overwrites files (doesn't prompt or number files)
OK. I've re-read this, more carefully this time, and it seems there's no bug. I
can't find a case where fb is actually overwriting an existing file without
asking. I tried doing the following things:

First, I created an empty file with the name "" on my

Testing Download Manager "Retry":
1) Then, I began a download of from the nightly
directory on the ftp site. 
2) Before it completed, I canceled the download. 
3) I double clicked the canceled item to retry the download. 
4) The file was downloaded to on my desktop. The
original empty file was untouched. 

Testing Link Click Downloading
1) I clicked the link in the nightly dir. 
2) I let the download complete
3) The file eventually appeared as "" on my desktop.
The original empty file was untouched. 

Testing "Save Link to Disk" context menu item
1) I right clicked on the link to in the nightly dir,
and chose "Save Link to Disk"
2) I let the download complete
3) The file showed up on my desktop as" on my
desktop. The original empty file was untouched. 

I see no "bug" here. See the bug Jesse mentions for more on the -1, -2, -3
Last Resolved: 15 years ago
Resolution: --- → WORKSFORME

Comment 7

15 years ago
I can't believe I'm writing this, but which build did you test with?

Albert and Ali-
What steps did you follow that caused it to overwrite?

Comment 8

15 years ago
UA: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031203

Using the official Win32 2003-12-03 nightly with no profile in %AppData%:

1. Run Firebird (it creates a new profile).
2. Click the link to download Mozilla Firebird 0.7 for Windows from the default
home page.

Actual Results:
It prompts you and asks where to save it.

Expected Results:
Since the prefs dialog says it should auto save to desktop (which is the default
setting), once you press save, it should just save there and not ask you. It's
acting as if its in Ask me where to save mode.

Issue #2:

1. Set pref to ask me where to save.
2. Set back to download automatically to desktop
3. Click link to Mozilla Firebird 0.7 for Windows
4. Choose save

Actual results:
Overwrites the previous download without asking

Expected Results:
Save as

Based on this, I suggest REOPEN.
Alan, the last win32 installer nightly on the ftp site. 
I don't see it overwrite. Watch closely. It does something else, which is also a

I download:
I then download the same file, and end up with:

At first glance the two might look the same, but they're separate files. This
issue deserves a separate bug. ("-1, -2 naming performed incorrectly on files
with |-digit| in their name") 

I'm looking at the first issue that you mention, which is _also_ a separate bug. 

Comment 11

15 years ago
Well, using the steps I noted originally, I thought I was noticing incorrect
behavior by Firebird, but I am no longer able to reproduce it.  Obviously, let's
keep this bug closed :)  Sorry for any trouble.

Comment 12

15 years ago
WFM Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031201

So how did this bug get 4 votes?

Comment 13

15 years ago

I am one of those who viote for this bug, because I could reproduce it. I just
made several tests (clearing all profiles, nightly and installer) and I am able
to reproduce it still.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031203
Firebird/0.7+ (installer)

Reproducible: Always
1. Create a folder "download" on desktop
2. Setup that all downloaded files shall be saved here
3. Open using 
4. Dowload with a click on it.
5. Wait until file is downloaded
6. Repeat 4.

FB is not asking to overwrite the file or mentioning that this file exists.
I also tried to download it using "Save Link To Disk". There also no question
dialog came up, but he downloaded the file putting a "-1" at the end. I cannot
reproduce this when clicking on the file directly. Tried it several times eben
with new profile and reinstalling mozilla and always can reproduce it. I think
it still is there...

Comment 14

15 years ago

Sorry Ben, this isn't what I'm seeing. I'm getting the overwriting behaviour as
I mentioned before. Could this be an OS specific issue? I'm using Windows XP
Professional with SP1 applied plus all patches.

Comment 15

15 years ago
OK, I just tried it again at a time when I'm more lucid, and I think I'm
starting to notice something new.

The reason I thought it had been fixed before was because I didn't notice I was
saving it in a different manner.  If you just left-click on download links (such
as off the Mozilla FTPs), it silently overwrites them.  This is true regardless
of whether I used the FirebirdSetup.exe or the or even
the file; in all cases, just simply clicking to download
and then saying "save to disk" results in Firebird overwriting the file.

However, on some other files I was testing, I was saving them in a different manner:
1. Go to, find some .torrent file you want (make it any file, it
doesn't matter really).
2. *Right-click* on the link and select "Save Link As..."
3. When the open/save dialog comes up, just click save to disk and hit OK.
4. Repeat a couple of times for good measure
When you follow those steps, Firebird *does* actually do the -1, -2 thing.  If
you do the same thing on files on the mozilla FTP, it also does the -1, -2
behavior properly.

For what it's worth, I'm still using the 20031201 Win32 build on XPHome SP1. 
Can someone confirm this so I can make sure I'm seeing things right?  I'm
thinking we should reopen the bug.

Comment 16

15 years ago
I'm confirming Albert's findings with 2003-12-04 CVS version. Left click
overwrites, right click --> save as appends number.

Resolution: WORKSFORME → ---


15 years ago
Summary: Download Manager silently overwrites files (doesn't prompt or number files) → Download Manager silently overwrites files (doesn't prompt or number files) when left clicking link

Comment 17

15 years ago
WFM when left-clicking links.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031204
Firebird/0.7+ (aebrahim)

Comment 18

15 years ago
This is what I think would be the best implementation:

Whether you left click or right click, firebird should check if the file already
exists. If yes, it should ask the following:
[                                           ]
[  The file c:\firebird.exe already exists. ]
[  Do you want to                           ]
[   <Overwrite>    <rename>    <Cancel>     ]

The rename botton should suggest firebird(1).exe etc.
This should satisfy all users.

Comment 19

15 years ago
That is bug 227343.  This is about overwriting without asking, when it should be
getting a new name automatically.

Comment 20

15 years ago
Oh Ok, now i understand. Sorry for that, I'll post my suggestion in bug 227343.


15 years ago
Keywords: regression

OK, I see the bug now. 

The steps to reproduce are:
1) New profile
2) Create an empty file on the desktop (or default download dir) with the file
name of a file on ftp.m.o, verify that this file is 0 bytes. 
2) Click a download link on ftp.m.o to a file with the same name. 
3) Click "Save to Disk" in the UCT dialog, do NOT click "Do this automatically
for files like this from now on"
4) Look at file size of file on desktop. It's now big, i.e. the file was

I discovered that when the UCT dialog shows, files are overwritten, because the
code path is different from when the UCT dialog does not show. I've checked in a
Last Resolved: 15 years ago15 years ago
Resolution: --- → FIXED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.