From 889c3251dfe81b5adaa72692619a093b58ae37b4 Mon Sep 17 00:00:00 2001 From: Antoine Gersant Date: Sun, 13 Nov 2016 14:59:39 -0800 Subject: [PATCH] Fixed a bug where uppercase extensions were not recognized --- src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index c55c538..fbb281b 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -9,7 +9,7 @@ pub fn is_song(path: &Path) -> bool { Some(e) => e, _ => return false, }; - match extension { + match extension.to_lowercase().as_str() { "mp3" => true, "ogg" => true, "m4a" => true, @@ -27,7 +27,7 @@ pub fn is_image(path: &Path) -> bool { Some(e) => e, _ => return false, }; - match extension { + match extension.to_lowercase().as_str() { "png" => true, "gif" => true, "jpg" => true,