Otherwise this chain of events can happen: - You already have a (partial) file downloaded - You start the download, and HTTP fails - This resets the download progress to the current size of the file - The TCP download starts at a very large value (UINT32_MAX - filesize) It now resets to 0% done when any negative value is being given. As added bonus, we no longer have to query how much was already downloaded.
40 KiB
40 KiB