Open Bug 864148 Opened 13 years ago Updated 2 years ago

Download Manager: Provide a pre-warning if there is no enough disk space in the target location to complete an intended file download

Categories

(Firefox :: Downloads Panel, enhancement, P3)

20 Branch
enhancement

Tracking

()

People

(Reporter: chamathmc, Unassigned)

References

Details

The title says it all: Once the free space is used up during a file download, different kinds of errors popped up when it was tested, something like, "Target file could not be read" / "unknown error occured" etc. It did also give me a free space not enough error. Try it with a location (eg: a flash drive with limited space) and download a file (The tested media was FAT32 formatted). Example: In case of Downloading a 10GB file into a flash drive of 9.9 GB of free space, the download would be broken at 99%, thereby wasting the user's bandwidth. This definitely should not happen because "Prevention is better than cure". Suggestion: Provide a pre-warning before a download if there is no enough space for the download. In fact, if virtual space reservation is not feasible, we can have a count in memory which represents the total space of all the files being downloaded in a particular location, and negate the actual free space in the target location with that count and consider the result as the projected free space for further downloads. In extreme, recovery procedures for possible broken downloads because of the free space problem (THIS IS NOT CONFIRMED) could be implemented.
Component: General → Downloads Panel
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86_64 → All

On some operating systems and filesystems, it's possible to reserve space for a file before actually writing to the file, so on those systems it would actually be possible to make this feature work reliably, insofar as it's possible for such a feature to be truly reliable.

The standard 'posix_fallocate' has (arguably) a drawback, in that it expands the "visible" size of the file as well as preallocating space. (In contrast, with the current implementation in Firefox, if a download is interrupted, it leaves a '.part' file which can later be resumed using 'wget -c' or similar. If Firefox used posix_fallocate to preallocate the entire file, it would be more difficult to resume partial downloads or to do anything useful with the incomplete file, and might also give users the false impression that the file was fully downloaded.)

Linux, however, provides a non-standard option ('fallocate' with 'FALLOC_FL_KEEP_SIZE') that would avoid this drawback. I don't know if any other systems have anything similar.

See Also: → 1595146
See Also: → 1172292
Priority: -- → P3
See Also: 1595146
Severity: normal → S3
Duplicate of this bug: 257812
You need to log in before you can comment on or make changes to this bug.