Skip to content

Commit

Permalink
[IconFetcher] Don't check for extension for image file.
Browse files Browse the repository at this point in the history
Issue: 1977
  • Loading branch information
DaveDavenport committed Apr 18, 2024
1 parent 4f09875 commit 9b6e70b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/rofi-icon-fetcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,15 @@ static void rofi_icon_fetcher_worker(thread_state *sdata,
}
cairo_surface_t *icon_surf = NULL;

#if 0 // unsure why added in past?
const char *suf = strrchr(icon_path, '.');
if (suf == NULL) {
sentry->query_done = TRUE;
g_free(icon_path_);
rofi_view_reload();
return;
}
#endif

GError *error = NULL;
GdkPixbuf *pb = gdk_pixbuf_new_from_file_at_scale(
Expand All @@ -371,9 +373,9 @@ static void rofi_icon_fetcher_worker(thread_state *sdata,
* without decoding all the frames. Since gdk_pixbuf_new_from_file_at_scale
* only decodes the first frame, this specific error needs to be ignored.
*/
if (error != NULL && g_error_matches(
error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION)) {
g_clear_error(&error);
if (error != NULL && g_error_matches(error, GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION)) {
g_clear_error(&error);
}

if (error != NULL) {
Expand Down

0 comments on commit 9b6e70b

Please sign in to comment.