Open Bug 536632 Opened 15 years ago Updated 2 years ago

Unintelligent file delete, when an incomplete download of the file is canceled

Categories

(Toolkit :: Downloads API, defect)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: kunal.t2, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6

when a file is partially downloaded (i.e paused midway) and the download_file &  the download_file.part are deleted externally.
When a different file with same name is downloaded in the same location.
On canceling the download from the download manager, deletes the new file.

Reproducible: Always

Steps to Reproduce:
1.Partially download a file (i.e. download a file and pause it midway).
2.go to the download location of the file in your filesystem.
3.Delete the file and the file.part
4.download another file by the same name (may be different size) using other means like wget or some other download manager.
5.from the download manager cancel the download.
6.the new file you downloaded is deleted !
Actual Results:  
the file downloaded by other means with the same name are deleted.

Expected Results:  
1.When the <filename>.part file is not present the download manager shouldn't delete the <filename> file.

2.if the size of the <filename> file differs or has a different time stamp / modification time , it should not be touched (deleted or modified) during subsequent resumes or on canceling the download.

well the data loss can be immense if the file is an ISO image (4GB ?) . That's why the Severity has been given as Normal & not Minor.
Firefox 29 on Ubuntu 14.04 here, the bug or a variation of it still exist. It doesn't even require fiddling with the file system, one only needs to download a file with the same name:

1. Go to a webpage and start a download
2. Make the download fail (for example by disconnecting from the Internet)
3. Go to the same webpage again and download the same file again
4. Clear the history to remove the failed download from 2.

This will make Firefox delete the .part file of the newly started download. The newly started download will continue as normal and fail on completion due to the missing .part file.

Bug still present on Firefox 64.0 on Ubuntu 18.04. Steps:

  1. Go to a webpage and start a download
  2. Make the download fail (for example by disconnecting from the Internet)
  3. Go to the same webpage again and download the same file again and let it complete
  4. Clear the history to remove the failed download from 2
  5. Firefox deletes the finished download

So, it's not necessarily limited to having a .part file or the second download attempt failing.

See Also: → 1485555
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.