cyberrumor / ammo

Almost Manual Mod Organizer - Linux MO for Bethesda Games
GNU General Public License v2.0
25 stars 6 forks source link

Incomplete downloads are not always hidden #14

Closed cyberrumor closed 10 months ago

cyberrumor commented 1 year ago

For example, DynDOLOD_Resources.7z appears in ~/Downloads even though there is a DynDOLOD_Resources.7z.part.

cyberrumor commented 1 year ago

This should be working for firefox now. I will need to determine how chromium decides to name partial downloads to fix this for chromium.

cyberrumor commented 10 months ago

Can't think of a way to reliably detect this for chrome still, and the logic for firefox doesn't always work for some reason. I think for this one, I will actually remove the logic that attempts to hide in-progress downloads in favor of improving the error handling around installation failing due to incomplete download.

cyberrumor commented 10 months ago

Instead of hiding downloads, we now check whether the download is complete before extraction. We test this via 7z t {download.name}. This is done before the file is renamed to something sane, which avoids file duplication and download mangling. We also don't populate directories disguised as downloads into ModController.downloads since it's an easy check.

I'm happy with this solution for now, and I'm not going to hide incomplete downloads since I can't think of a clean implementation for it.