mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-20 05:17:18 +00:00

Currently, we extract all the extensions from an image path and report back that the image is invalid if *any* of the extensions is not a valida extension, however this can cause trouble with images including information between dots that are not strictly extensions. For example: ``` elementaryos-0.3.2-stable-i386.20151209.iso ``` Etcher will consider `20151209` to be an invalid extension and therefore will prevent such image from being selected. As a way to allow these corner cases but will make use of our enforced check controls, the validation routine will only consider extensions starting from the first non compressed extension. This PR also includes logic to show a nice GUI dialog saying that the image is invalid in order to provide a much better experience than just silently failing. Fixes: https://github.com/resin-io/etcher/issues/492 Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>