mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 02:40:49 +00:00
LibGfx: Make Bitmap path handling case insensitive
Bitmap::is_path_a_supported_image_format() and Bitmap::load_from_file() now check the file extension with CaseSensitivity::CaseInsensitive. This fixes a couple of inconsistencies, for example would FileSystemModel::icon_for() recognize image files uppercase extensions but couldn't create thumbnails for them (any attempt to create a bitmap from such files would fail).
This commit is contained in:
committed by
Andreas Kling
parent
d3ee3fc68a
commit
5b68ea8dde
@@ -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<FileSystemModel*>(this)->fetch_thumbnail_for(node))
|
||||
return FileIconProvider::filetype_image_icon();
|
||||
|
||||
Reference in New Issue
Block a user