diff --git a/Libraries/LibGUI/FileSystemModel.cpp b/Libraries/LibGUI/FileSystemModel.cpp index b132e8800a..de2ae8a404 100644 --- a/Libraries/LibGUI/FileSystemModel.cpp +++ b/Libraries/LibGUI/FileSystemModel.cpp @@ -471,7 +471,7 @@ Icon FileSystemModel::icon_for(const Node& node) const if (node.full_path() == "/") return FileIconProvider::icon_for_path("/"); - if (Gfx::Bitmap::is_path_a_supported_image_format(node.name.to_lowercase())) { + if (Gfx::Bitmap::is_path_a_supported_image_format(node.name)) { if (!node.thumbnail) { if (!const_cast(this)->fetch_thumbnail_for(node)) return FileIconProvider::filetype_image_icon(); diff --git a/Libraries/LibGfx/Bitmap.cpp b/Libraries/LibGfx/Bitmap.cpp index cd07ce0037..cc102d45c0 100644 --- a/Libraries/LibGfx/Bitmap.cpp +++ b/Libraries/LibGfx/Bitmap.cpp @@ -122,8 +122,8 @@ RefPtr Bitmap::create_wrapper(BitmapFormat format, const IntSize& size, RefPtr Bitmap::load_from_file(const StringView& path) { -#define __ENUMERATE_IMAGE_FORMAT(Name, Ext) \ - if (path.ends_with(Ext)) \ +#define __ENUMERATE_IMAGE_FORMAT(Name, Ext) \ + if (path.ends_with(Ext, CaseSensitivity::CaseInsensitive)) \ return load_##Name(path); ENUMERATE_IMAGE_FORMATS #undef __ENUMERATE_IMAGE_FORMAT diff --git a/Libraries/LibGfx/Bitmap.h b/Libraries/LibGfx/Bitmap.h index 493c3292f6..c1118784d8 100644 --- a/Libraries/LibGfx/Bitmap.h +++ b/Libraries/LibGfx/Bitmap.h @@ -97,8 +97,8 @@ public: static RefPtr create_from_serialized_byte_buffer(ByteBuffer&& buffer); static bool is_path_a_supported_image_format(const StringView& path) { -#define __ENUMERATE_IMAGE_FORMAT(Name, Ext) \ - if (path.ends_with(Ext)) \ +#define __ENUMERATE_IMAGE_FORMAT(Name, Ext) \ + if (path.ends_with(Ext, CaseSensitivity::CaseInsensitive)) \ return true; ENUMERATE_IMAGE_FORMATS #undef __ENUMERATE_IMAGE_FORMAT