Closed Bug 313286 Opened 19 years ago Closed 18 years ago

Download manager deletes file when you click cancel, even if this file has been replaced.

Categories

(Toolkit :: Downloads API, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 334835

People

(Reporter: Wart, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

Download manager deletes a file based on file name not on file attributes.  i.e.
if I start to download foo.mpg then overwrite foo.mpg in the download location,
then cancel the download, the overwritten foo.mpg gets deleted.

Reproducible: Always

Steps to Reproduce:
Lets say I'm downloading a movie foo.mpg.  When the download finishes, I realize
that I set the file to open in winamp automatically, so it isn't saved in the
normal download location (for me my desktop).  I realize I want to save the
file, so I start to download it again, this time saving it instead of opening
it.  When the download manager opens, I realize I can right click and go to the
containing folder, and get the first file I downloaded.  I cut this file, and
paste it to the desktop, which then overwrites the file that Firefox is
currently downloading. i.e. I replace foo.mpg (0 bytes) with foo.mpg (10Mb). 
Since I found the whole movie on my harddrive, I realize I don't need the
download anymore, and I cancel it.
Problem: When I click cancel it deletes the 10 Meg file on my desktop, because
it has the same name as the one Firefox was downloading.  Seems as if the
browser only checks for file name, and not some other attrib such as size.
Actual Results:  
See steps to reproduce

Expected Results:  
Not deleted the replaced file.  If a file is overwritten during download, it
shouldn't be deleted if I click cancel.

*** This bug has been marked as a duplicate of 334835 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.