Xpl0itU / WiiUDownloader

Allows to download encrypted wiiu files from nintendo's official servers
GNU General Public License v3.0
876 stars 24 forks source link

Fix file corruption when pausing download for >30s #53

Closed datatags closed 1 year ago

datatags commented 1 year ago

I know you said you're already working on the Rust port, but this should help in the meantime. This PR simply resets the file position to the start of the file before activating curl, which should prevent it from appending a correctly-downloaded file to a partial download.

I've tested it by starting a download of "Darts Up (US)," waiting until the status box says it's downloading 00000016.app, then pausing it and walking away for a minute. When resuming, it appears to stutter for a second, and then restart the file download from the beginning (as it did before,) but with this change, it doesn't corrupt the file when it does this.