pop-os / popsicle

Multiple USB File Flasher
MIT License
633 stars 76 forks source link

Auto-verify or auto-fill hash if a .sha256 file is in the same directory #190

Open cassidyjames opened 1 year ago

cassidyjames commented 1 year ago

I'm not entirely sure if this is feasible, especially in the Flatpak sandbox, but a common way I use Popsicle is to flash an image from a download when I have a matching .sha256 file alongside the image. It would be handy if Popsicle could detect if that file exists and either automatically try to verify the image, or at least auto-fill the hash to be checked from the shasum file.

ids1024 commented 1 year ago

Yeah, I don't think this would be possible in the Flatpak sandbox (without giving it broader filesystem permissions). The FileChooser portal creates an open dialog outside the sandbox, and only gives us the file descriptor for the individual file selected by the user. We could enable multiple selection, but wouldn't have a way to enforce that exactly one image and at most one checksum file are selected.

Without such restrictive sandboxing, it shouldn't be that difficult. Mainly a matter of deciding on exactly how it should behave and how the UI could communicate that clearly to the user.

cassidyjames commented 1 year ago

I guess this would be blocked pending https://github.com/flatpak/xdg-desktop-portal/issues/463