Repository: pop-os/popsicle (language: rust)

Issue:
Flasher cannot find image file if the extension is uppercase
**Distribution (run `cat /etc/os-release`):**
```
NAME="Pop!_OS"
VERSION="18.04 LTS"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Pop!_OS 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://system76.com/pop"
SUPPORT_URL="http://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
 ```
**Related Application and/or Package Version (run `apt policy $PACKAGE NAME`):**
```
popsicle:
  Installed: 0.1.5~1560357257~18.04~3d3d410
  Candidate: 0.1.5~1560357257~18.04~3d3d410
  Version table:
 *** 0.1.5~1560357257~18.04~3d3d410 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
popsicle-gtk:
  Installed: 0.1.5~1560357257~18.04~3d3d410
  Candidate: 0.1.5~1560357257~18.04~3d3d410
  Version table:
 *** 0.1.5~1560357257~18.04~3d3d410 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
```
**Issue/Bug Description:**
Popsicle GUI file browser does not show image file (.iso) if the extension is in upper case (.ISO)

**Steps to reproduce (if you know):**
1. Start Popsicle GUI
2. Click on the "Choose Image" button and browse to a folder which you know contains an .ISO file (.iso image with extension in uppercase)
3. Wonder why Popsicle is not showing the image, which you can clearly see in your file browser.

**Expected behavior:**
Popsicle file browser should not care whether the extension of image files are upper or lower case. The file should be visible in the browser if it ends in \\.(ISO|iso)$





Discussion / hints:

Fix patch:
diff --git a/gtk/src/app/widgets/dialogs.rs b/gtk/src/app/widgets/dialogs.rs
index 9657491..320fa30 100644
--- a/gtk/src/app/widgets/dialogs.rs
+++ b/gtk/src/app/widgets/dialogs.rs
@@ -17,8 +17,8 @@ impl OpenDialog {
             ..add_button("Open", ResponseType::Ok.into());
             ..set_filter(&cascade! {
                 FileFilter::new();
-                ..add_pattern("*.iso");
-                ..add_pattern("*.img");
+                ..add_pattern("*.[Ii][Ss][Oo]");
+                ..add_pattern("*.[Ii][Mm][Gg]");
             });
             | if let Some(p) = path {
                 dialog.set_current_folder(p);
diff --git a/gtk/src/main.rs b/gtk/src/main.rs
index cd9d0eb..91b4f5f 100644
--- a/gtk/src/main.rs
+++ b/gtk/src/main.rs
@@ -23,7 +23,11 @@ fn main() {
 
     if let Some(iso_argument) = env::args().nth(1) {
         let path = PathBuf::from(iso_argument);
-        if path.extension().map_or(false, |ext| ext == "iso" || ext == "img") && path.exists() {
+        if path.extension().map_or(false, |ext| {
+            let lower_ext = ext.to_str().expect("Could not convert CStr to Str").to_lowercase();
+            lower_ext == "iso" || lower_ext == "img"
+        }) && path.exists()
+        {
             let _ = app.state.ui_event_tx.send(UiEvent::SetImageLabel(path));
         }
     }


Test patch: